Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Creating Variable for a Sheet

I have to copy data from one sheet to another. I am sending this program for
others to use and I don't know what they will name the sheet. I have a macro
that uses the ActiveSheet function right now, but I was hoping to get
something that is less sensitive and set up a variable for the entire sheet.
Thanks,
Kyle Kyburz
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Creating Variable for a Sheet

Hi Kyle

If it's not the active sheet, how would the code recognize it ? Is there
anything unique in it ? And where is the macro, how is it started ?

Best wishes Harald

"kyle" skrev i melding
...
I have to copy data from one sheet to another. I am sending this program

for
others to use and I don't know what they will name the sheet. I have a

macro
that uses the ActiveSheet function right now, but I was hoping to get
something that is less sensitive and set up a variable for the entire

sheet.
Thanks,
Kyle Kyburz



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Creating Variable for a Sheet

I have a sheet called "Middle Sheet". In cell C1 I have the name of a
person. All other sheet's names in the workbook are a person's name. What I
would like is to take the name in C1 and put it into some sort of variable.
Then take that variable and open the sheet. So I can copy data into the
sheet.
thanks,
kyle

"Harald Staff" wrote:

Hi Kyle

If it's not the active sheet, how would the code recognize it ? Is there
anything unique in it ? And where is the macro, how is it started ?

Best wishes Harald

"kyle" skrev i melding
...
I have to copy data from one sheet to another. I am sending this program

for
others to use and I don't know what they will name the sheet. I have a

macro
that uses the ActiveSheet function right now, but I was hoping to get
something that is less sensitive and set up a variable for the entire

sheet.
Thanks,
Kyle Kyburz




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Creating Variable for a Sheet

also, since I am sending this program out to be used by others I don't know
the names of the sheets. That is why I need it in variable form.
thanks,
kyle

"kyle" wrote:

I have a sheet called "Middle Sheet". In cell C1 I have the name of a
person. All other sheet's names in the workbook are a person's name. What I
would like is to take the name in C1 and put it into some sort of variable.
Then take that variable and open the sheet. So I can copy data into the
sheet.
thanks,
kyle

"Harald Staff" wrote:

Hi Kyle

If it's not the active sheet, how would the code recognize it ? Is there
anything unique in it ? And where is the macro, how is it started ?

Best wishes Harald

"kyle" skrev i melding
...
I have to copy data from one sheet to another. I am sending this program

for
others to use and I don't know what they will name the sheet. I have a

macro
that uses the ActiveSheet function right now, but I was hoping to get
something that is less sensitive and set up a variable for the entire

sheet.
Thanks,
Kyle Kyburz




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating Variable for a Sheet


Sheets have a TAB name and a Code name.
The code name can only be changed in the VBE.

So you should use that name to reference your sheet

--
Kaa
-----------------------------------------------------------------------
Kaak's Profile: http://www.excelforum.com/member.php...nfo&userid=751
View this thread: http://www.excelforum.com/showthread.php?threadid=55700



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Creating Variable for a Sheet

That would work except the people using the sheet need to be able to add
sheets, so I would not be able to reference. Could I create a prompt and
have the user type in the head name?

"Kaak" wrote:


Sheets have a TAB name and a Code name.
The code name can only be changed in the VBE.

So you should use that name to reference your sheet.


--
Kaak
------------------------------------------------------------------------
Kaak's Profile: http://www.excelforum.com/member.php...fo&userid=7513
View this thread: http://www.excelforum.com/showthread...hreadid=557001


Reply
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
Creating a value from a variable result Darren Excel Discussion (Misc queries) 1 April 19th 10 06:43 PM
creating a variable Abe New Users to Excel 1 April 15th 06 06:41 AM
Macro Creating Variable and using variable in a SQL statement Jimmy Excel Programming 4 October 25th 04 02:36 AM
Macro Creating a variable which is to be used in a SQL in the Mac Jimmy Excel Programming 0 October 25th 04 01:21 AM
Macro Creating a variable which is to be used in a SQL in the Mac Jimmy Excel Programming 1 October 24th 04 11:22 AM


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