Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using the replaceline function to change some code. Part of the
new code is a variable. I want to add the variable value in the new code, not the variable name. Newcodeline = "Sheets(" & """ & NewCompName & """ & ").Visible = True" What I get is ... Sheets(" & NewCompName & ").Visible = True I have tried multiple variants but I can't get a right combination. I can get Sheets("NewCompName").Visible = True but not what I want. Ej: if NewCompName were Mckinsey, I want to see Sheets("Mckinsey").Visible = True Any suggestions? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Newcodeline = "Sheets(" & """" & NewCompName & """" & ").Visible = True"
-- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "Pablo" wrote in message oups.com... I am using the replaceline function to change some code. Part of the new code is a variable. I want to add the variable value in the new code, not the variable name. Newcodeline = "Sheets(" & """ & NewCompName & """ & ").Visible = True" What I get is ... Sheets(" & NewCompName & ").Visible = True I have tried multiple variants but I can't get a right combination. I can get Sheets("NewCompName").Visible = True but not what I want. Ej: if NewCompName were Mckinsey, I want to see Sheets("Mckinsey").Visible = True Any suggestions? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Quotation Marks | Excel Discussion (Misc queries) | |||
without quotation marks? | Excel Discussion (Misc queries) | |||
Quotation Marks - When and What?? | Excel Discussion (Misc queries) | |||
quotation marks | Excel Worksheet Functions | |||
Quotation Marks | Excel Programming |