LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Excel Macro 'Sheet.Range.Value' Syntax Questions

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro syntax for selecting variable range Matt Excel Discussion (Misc queries) 1 October 31st 07 07:13 PM
Syntax Help: Range variables (plucking data and pasting to 2nd sheet) Finny[_3_] Excel Programming 6 August 11th 06 10:55 PM
2 questions, copying data from sheet to sheet and assigning macro Boris Excel Worksheet Functions 0 December 16th 04 06:11 PM
Excel macro - Range & Sheet name error sjohns34 Excel Programming 1 June 16th 04 07:10 PM
Macro Questions: Returning multiple results, description of parameter syntax et al. Frederik Romanov Excel Programming 1 July 17th 03 04:42 PM


All times are GMT +1. The time now is 04:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"