Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default naming my worksheet

I have a tabstrip on my userform to set the current sheet:
Private Sub TabStrip1_Change()
wsMyWorksheet = Worksheets("Sheet" & Me.TabStrip1.Value +1)
....but this doesn't work because it's combining a string with a number, I
think. How would I asign wsMyWorksheet to "sheetx" where x is the value of
tabstrip plus 1?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 367
Default naming my worksheet

The combination of a number with a string shouldn't be a problem.

I think what you forgot is the "set" statement:

Private Sub TabStrip1_Change()

dim wsMyWorksheet as worksheet
set wsMyWorksheet = Worksheets("Sheet" & Me.TabStrip1.Value +1)

end sub

hth

Carlo

On Dec 26, 2:00*pm, Charlie wrote:
I have a tabstrip on my userform to set the current sheet:
Private Sub TabStrip1_Change()
wsMyWorksheet = Worksheets("Sheet" & Me.TabStrip1.Value +1)
...but this doesn't work because it's combining a string with a number, I
think. *How would I asign wsMyWorksheet to "sheetx" *where x is the value of
tabstrip plus 1?


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
Worksheet naming Woodstock Excel Discussion (Misc queries) 3 January 20th 09 10:35 PM
Naming A Worksheet Charles A. Lackman Excel Programming 1 October 26th 06 09:06 PM
Naming worksheet Arne Hegefors Excel Programming 1 September 19th 06 10:38 AM
Naming Worksheet Denis New Users to Excel 2 September 13th 05 05:55 PM
Naming a worksheet help? pauldaddyadams Excel Worksheet Functions 1 August 9th 05 10:46 AM


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