P
Pablo
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?
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?