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: 385
Default Sheet Reference Syntax

I'm pretty sure I've done this before, but can't recall the syntax...

I have a variable strDataSheetName that is a string and refers to the name
of a worksheet. I have it as a string variable, because the name of the
sheet I want to refer to has to do with the name of the sheet I am on.

How do I select this sheet using the variable name? See code below (this
syntax does not work)...

ActiveChart.SetSourceData Source:=Sheets("" &
strDataSheetName).Columns("A:F"), PlotBy:=xlColumns

Thanks!
 
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
cell reference syntax Fred Excel Worksheet Functions 2 December 16th 08 04:01 PM
Worksheet reference syntax? Matt Excel Discussion (Misc queries) 3 May 19th 08 09:02 PM
Reference for VB syntax for Excel functions [email protected] Excel Programming 2 July 14th 06 03:18 AM
Syntax to return the value of a control by reference Broadband Al Excel Discussion (Misc queries) 3 January 26th 06 01:20 AM
Syntax for Range Reference Ken Excel Programming 1 December 8th 04 05:15 PM


All times are GMT +1. The time now is 03:24 AM.

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"