Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default Set Worksheet Names in a Module

Hi
Example:

set wksCurrent = worksheets("Testing")
set wksNew = worksheets("Antoher")

as the same names can be used over each sheet instead of having to enter
code in as Sheets("Testing").cmdTest.visible = true
I was hoping to cut it down to be wkscurrent.cmdtest.visible = true

Any help aprreciated.
Thanks
Noemi
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Set Worksheet Names in a Module

You could use:

wkscurrent.OLEObjects("CommandButton1").Visible = False

Or you could use the CodeName (look at the properties of the worksheet when
you're in the VBE)

Sheet1.CommandButton1.visible = true

Inside the VBE
hit ctrl-r (to see the project explorer
Click on the worksheet
hit F4 to see the properties of that sheet
the property called (Name) -- with the parentheses
is the codename.

You can type over that name to get something more meaningful, too.

Maybe Testing???

then
Testing.commandbutton1.visible = true
would work



Noemi wrote:

Hi
Example:

set wksCurrent = worksheets("Testing")
set wksNew = worksheets("Antoher")

as the same names can be used over each sheet instead of having to enter
code in as Sheets("Testing").cmdTest.visible = true
I was hoping to cut it down to be wkscurrent.cmdtest.visible = true

Any help aprreciated.
Thanks
Noemi


--

Dave Peterson
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
How to sort Worksheet names? devrim Excel Discussion (Misc queries) 5 May 26th 06 04:36 PM
Duplicate Range Names by worksheet FlaAl Excel Discussion (Misc queries) 0 May 24th 06 05:14 PM
Adding worksheet tab names to the first worksheet adam Excel Discussion (Misc queries) 1 May 17th 06 02:07 AM
Lookups using worksheet names Soapydux Excel Discussion (Misc queries) 3 November 6th 05 04:17 PM
Worksheet names JF Bouthillier Excel Worksheet Functions 3 November 6th 04 04:28 AM


All times are GMT +1. The time now is 08:40 PM.

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

About Us

"It's about Microsoft Excel"