Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default To include Depot

Hello From Steved

Set wksT = GetWorksheet(wks.Parent, _
"Sheet" & Left(cell.Text, 2))

I've made Changes to the above

Set wksT = GetWorksheet(wks.Parent, _
"" & Left(cell.Text, 8))

It now names the sheet "Papakura" instead of SheetPapakura.
Please what Do I enter in the above code to add Depot
as an example "Papakura Depot".

Thankyou.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default To include Depot

you can't have spaces in sheet names.

Set wksT = GetWorksheet(wks.Parent, _
"" & Left(cell.Text, 8)) & "_Depot"

--
Regards,
Tom Ogilvy


"Steved" wrote in message
...
Hello From Steved

Set wksT = GetWorksheet(wks.Parent, _
"Sheet" & Left(cell.Text, 2))

I've made Changes to the above

Set wksT = GetWorksheet(wks.Parent, _
"" & Left(cell.Text, 8))

It now names the sheet "Papakura" instead of SheetPapakura.
Please what Do I enter in the above code to add Depot
as an example "Papakura Depot".

Thankyou.





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default To include Depot

Set wksT = GetWorksheet(wks.Parent, _
Left(cell.Text, 8) & "Depot")


"Steved" wrote in message
...
Hello From Steved

Set wksT = GetWorksheet(wks.Parent, _
"Sheet" & Left(cell.Text, 2))

I've made Changes to the above

Set wksT = GetWorksheet(wks.Parent, _
"" & Left(cell.Text, 8))

It now names the sheet "Papakura" instead of SheetPapakura.
Please what Do I enter in the above code to add Depot
as an example "Papakura Depot".

Thankyou.





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default To include Depot

Sorry. First response didn't have a space before "Depot".

Set wksT = GetWorksheet(wks.Parent, _
Left(cell.Text, 8) & " Depot")

If you want the whole name, plus " Depot" use:

Set wksT = GetWorksheet(wks.Parent, _
cell.Text & " Depot")



"Steved" wrote in message
...
Hello From Steved

Set wksT = GetWorksheet(wks.Parent, _
"Sheet" & Left(cell.Text, 2))

I've made Changes to the above

Set wksT = GetWorksheet(wks.Parent, _
"" & Left(cell.Text, 8))

It now names the sheet "Papakura" instead of SheetPapakura.
Please what Do I enter in the above code to add Depot
as an example "Papakura Depot".

Thankyou.





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default To include Depot

Right Tom, no spaces in names. Uh, I knew that. Time to turn in for me.

"Bob Kilmer" wrote in message
...
Sorry. First response didn't have a space before "Depot".

Set wksT = GetWorksheet(wks.Parent, _
Left(cell.Text, 8) & " Depot")

If you want the whole name, plus " Depot" use:

Set wksT = GetWorksheet(wks.Parent, _
cell.Text & " Depot")



"Steved" wrote in message
...
Hello From Steved

Set wksT = GetWorksheet(wks.Parent, _
"Sheet" & Left(cell.Text, 2))

I've made Changes to the above

Set wksT = GetWorksheet(wks.Parent, _
"" & Left(cell.Text, 8))

It now names the sheet "Papakura" instead of SheetPapakura.
Please what Do I enter in the above code to add Depot
as an example "Papakura Depot".

Thankyou.









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default To include Depot

Hello folks from Steved

Used below and works a treat
ps Swanson Depot that's what I got

Set wksT = GetWorksheet(wks.Parent, _
"" & Right(cell.Text, 8) & " Depot")

Thankyou.

-----Original Message-----
Hello From Steved

Set wksT = GetWorksheet(wks.Parent, _
"Sheet" & Left(cell.Text, 2))

I've made Changes to the above

Set wksT = GetWorksheet(wks.Parent, _
"" & Left(cell.Text, 8))

It now names the sheet "Papakura" instead of

SheetPapakura.
Please what Do I enter in the above code to add Depot
as an example "Papakura Depot".

Thankyou.



.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default To include Depot

you can't have spaces in sheet names.

Huh? Worksheet names can certainly contain spaces.

Worksheets(1).Name = "the name"

works fine for me.



"Tom Ogilvy" wrote in message
...
you can't have spaces in sheet names.

Set wksT = GetWorksheet(wks.Parent, _
"" & Left(cell.Text, 8)) & "_Depot"

--
Regards,
Tom Ogilvy


"Steved" wrote in message
...
Hello From Steved

Set wksT = GetWorksheet(wks.Parent, _
"Sheet" & Left(cell.Text, 2))

I've made Changes to the above

Set wksT = GetWorksheet(wks.Parent, _
"" & Left(cell.Text, 8))

It now names the sheet "Papakura" instead of SheetPapakura.
Please what Do I enter in the above code to add Depot
as an example "Papakura Depot".

Thankyou.







  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default To include Depot

Bob,
I was thinking of Defined Names/Named Ranges - Certainly you can have a
space in a worksheet name. My mistake.

--
Regards,
Tom Ogilvy

"Bob Kilmer" wrote in message
...
Right Tom, no spaces in names. Uh, I knew that. Time to turn in for me.

"Bob Kilmer" wrote in message
...
Sorry. First response didn't have a space before "Depot".

Set wksT = GetWorksheet(wks.Parent, _
Left(cell.Text, 8) & " Depot")

If you want the whole name, plus " Depot" use:

Set wksT = GetWorksheet(wks.Parent, _
cell.Text & " Depot")



"Steved" wrote in message
...
Hello From Steved

Set wksT = GetWorksheet(wks.Parent, _
"Sheet" & Left(cell.Text, 2))

I've made Changes to the above

Set wksT = GetWorksheet(wks.Parent, _
"" & Left(cell.Text, 8))

It now names the sheet "Papakura" instead of SheetPapakura.
Please what Do I enter in the above code to add Depot
as an example "Papakura Depot".

Thankyou.









  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default To include Depot

you can't have spaces in sheet names.
I was thinking of Defined Names/Named Ranges - Certainly you can have a
space in a worksheet name. My mistake.
--
Regards,
Tom Ogilvy


"Tom Ogilvy" wrote in message
...
you can't have spaces in sheet names.

Set wksT = GetWorksheet(wks.Parent, _
"" & Left(cell.Text, 8)) & "_Depot"

--
Regards,
Tom Ogilvy


"Steved" wrote in message
...
Hello From Steved

Set wksT = GetWorksheet(wks.Parent, _
"Sheet" & Left(cell.Text, 2))

I've made Changes to the above

Set wksT = GetWorksheet(wks.Parent, _
"" & Left(cell.Text, 8))

It now names the sheet "Papakura" instead of SheetPapakura.
Please what Do I enter in the above code to add Depot
as an example "Papakura Depot".

Thankyou.







  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default To include Depot

Thanks for the help Chip.

Can you use Instr without the 1 as the first argument? <g

--
Regards,
Tom Ogilvy


"Chip Pearson" wrote in message
...
you can't have spaces in sheet names.


Huh? Worksheet names can certainly contain spaces.

Worksheets(1).Name = "the name"

works fine for me.



"Tom Ogilvy" wrote in message
...
you can't have spaces in sheet names.

Set wksT = GetWorksheet(wks.Parent, _
"" & Left(cell.Text, 8)) & "_Depot"

--
Regards,
Tom Ogilvy


"Steved" wrote in message
...
Hello From Steved

Set wksT = GetWorksheet(wks.Parent, _
"Sheet" & Left(cell.Text, 2))

I've made Changes to the above

Set wksT = GetWorksheet(wks.Parent, _
"" & Left(cell.Text, 8))

It now names the sheet "Papakura" instead of SheetPapakura.
Please what Do I enter in the above code to add Depot
as an example "Papakura Depot".

Thankyou.









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
Latest Taxation Books available at jain book depot LATEST BOOKRELEASES JACK ANDERSON Excel Worksheet Functions 0 May 29th 10 01:25 PM
Include YTD calculations? MrRJ Excel Worksheet Functions 4 May 18th 10 08:33 PM
Include Worksheet Juan Schwartz Excel Worksheet Functions 0 February 10th 06 08:10 PM
Sum numbers that include #N/A ww Excel Worksheet Functions 3 March 27th 05 02:21 AM
To include Depot Steved[_3_] Excel Programming 0 September 24th 04 02:13 AM


All times are GMT +1. The time now is 02:37 AM.

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"