Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
dim statements for worksheets array
I am creating a macro in visual basic 6 for excel .I came across some code in
vb help to fill across sheets, eg. x = Array("Sheet1", "Sheet5", sheet7") Sheet(x).FillAcrossSheets _ Worksheets("Sheet1").Range("A1:C5") But I am having trouble dimentioning the above code. Any suggestions please. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
dim statements for worksheets array
Try
Dim X As Variant X = Array("Sheet1", "Sheet5", "sheet7") Sheets(X).FillAcrossSheets _ Worksheets("Sheet1").Range("A1:C5") -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "RichardVisteon" wrote in message ... I am creating a macro in visual basic 6 for excel .I came across some code in vb help to fill across sheets, eg. x = Array("Sheet1", "Sheet5", sheet7") Sheet(x).FillAcrossSheets _ Worksheets("Sheet1").Range("A1:C5") But I am having trouble dimentioning the above code. Any suggestions please. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
dim statements for worksheets array
Your issue was my issue...thx for the help, however, another question off of
this.... I have this code/macro saved in my personal macro wkbk, but how can I make it work in a wkbk with same exact structure, different file and tab names? Is there some sort of "currentwkbk" property or command I can use in the code, instead of the specific sheet names? "RichardVisteon" wrote: I am creating a macro in visual basic 6 for excel .I came across some code in vb help to fill across sheets, eg. x = Array("Sheet1", "Sheet5", sheet7") Sheet(x).FillAcrossSheets _ Worksheets("Sheet1").Range("A1:C5") But I am having trouble dimentioning the above code. Any suggestions please. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Array formula with and/or statements | Excel Discussion (Misc queries) | |||
& combine two array statements | Excel Worksheet Functions | |||
If(and statements using data in an array | Excel Discussion (Misc queries) | |||
IF statements across Worksheets | Excel Worksheet Functions | |||
Convert repetitive IF statements to array loop? | Excel Programming |