[Solved] VBA Macros

Keyboard macros or custom scripts

[Solved] VBA Macros

Postby alanbeban » Sat Nov 04, 2017 9:49 pm

In VBA, how do I refer to multi-area ranges? For example, with

Set rng1=ThisWorkbook.Worksheets(1).Range("A1:B2")
Set rng2=ThisWorkbook.Worksheets(1).Range("C3:D4")
Set rng3=ThisWorkbook.Worksheets(1).Range(" ? ")

so that rng3 is the multi-area range comprised of rng1 and rng2?

Thanks.
Last edited by Hagar Delest on Fri Nov 24, 2017 9:37 am, edited 1 time in total.
Reason: tagged solved
Open Office macOS Sierra 10.12.6
alanbeban
 
Posts: 4
Joined: Sun Oct 22, 2017 2:57 am

Re: VBA Macros

Postby alanbeban » Sun Nov 05, 2017 8:54 pm

Never mind.

Set rng3 = Union(rng1,rng2)
Open Office macOS Sierra 10.12.6
alanbeban
 
Posts: 4
Joined: Sun Oct 22, 2017 2:57 am


Return to OpenOffice Basic, Python, BeanShell, JavaScript

Who is online

Users browsing this forum: No registered users and 8 guests