Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Latest Taxation Books available at jain book depot LATEST BOOKRELEASES | Excel Worksheet Functions | |||
Include YTD calculations? | Excel Worksheet Functions | |||
Include Worksheet | Excel Worksheet Functions | |||
Sum numbers that include #N/A | Excel Worksheet Functions | |||
To include Depot | Excel Programming |