Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've got a few very basic syntax questions.
On my main worksheet, I've got a list of sheet names. I've saved them as variables using the following commands: Dim ProjectSheet1 As String Dim ProjectSheet2 As String ProjectSheet1 = Sheets(1).Range("C6").Value ProjectSheet1 = Sheets(1).Range("C7").Value I'd like to extract certain information using data from the "Criteria" sheet like this: Sheets("ProjectSheet1").Columns("A:B").AdvancedFil ter Action:= _ xlFilterCopy, CriteriaRange:=Sheets("Criteria").Range("A2:A3"), CopyToRange _ :=Columns("A:B"), Unique:=True This places the information on the active sheet. That's fine, except that the Sheets("ProjectSheet1") isn't working. If I input the actual sheet name in quotes, everything runs fine. ProjectSheet1 also doesn't work without quotes. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro syntax for selecting variable range | Excel Discussion (Misc queries) | |||
Syntax Help: Range variables (plucking data and pasting to 2nd sheet) | Excel Programming | |||
2 questions, copying data from sheet to sheet and assigning macro | Excel Worksheet Functions | |||
Excel macro - Range & Sheet name error | Excel Programming | |||
Macro Questions: Returning multiple results, description of parameter syntax et al. | Excel Programming |