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: 74
Default Range Question

Greetings,

With some help from this group, I have a macro that copies a sheet several
times to the same workbook and then renames them. With the copy, all the
ranges in the sheet are copied also. This is great since when sheets is
activated several macros work without any chances. Now however, I am having
problems when I need to access these ranges and the parent sheet is not
active. Another interesting thing is that the copied ranges do not show up
in the list when you use Insert Name Define command tree.

What I am trying to get to is to be able to use the ranges in a Match
structure, so they need to end up as strings. In my previous coding, I used
string variables to make the coding very versatile.

Dim ItemNameRng As String

ItemNameRng = "Data"

I have tried getting the worksheet name into a variable wrksheet and adding
it to the range;

ItemNameRng = wrksheet + "Data"

Similarly I have tried;

ItemNameRng = Worksheets(wrksheet).Range( "Data")

None of these, and other variations, have worked.

Any ideas on how to fix this?

Thanks in advance!!


 
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
Range question in '97 Adam Kroger Excel Discussion (Misc queries) 10 December 12th 05 03:44 AM
Range question strataguru[_19_] Excel Programming 2 September 25th 04 12:57 AM
Used Range Question a Excel Programming 2 May 26th 04 03:45 AM
range question Simon Sunke Excel Programming 0 February 23rd 04 02:39 PM
Range.Formula and Range question using Excel Automation [email protected] Excel Programming 0 September 19th 03 04:53 AM


All times are GMT +1. The time now is 11: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"