Using a Varible inside of a proper address
Top of the morning
Assume the following: LogSheet being a definied string variable LogSheet has the value of 'Feb' assinged to it It is used in the following line of code ActiveWorkbook.Names.Add Name:="count", RefersToR1C1:="=LogSheet!R8C7" The code runs I want Feb!r8c7.....I get LogSheetr8c7 Thanks in advance for any help |
Using a Varible inside of a proper address
Try this
ActiveWorkbook.Names.Add Name:="count", RefersToR1C1:="=" & LogSheet & "!R8C7" If this does not work you may have to sent the string to a variable first x= "=" & LogSheet & "!R8C7" then ActiveWorkbook.Names.Add Name:="count", RefersToR1C1:= x TerryK |
Using a Varible inside of a proper address
Thanks for the solution....worked liked a charm
-----Original Message----- Try this ActiveWorkbook.Names.Add Name:="count", RefersToR1C1:="=" & LogSheet & "!R8C7" If this does not work you may have to sent the string to a variable first x= "=" & LogSheet & "!R8C7" then ActiveWorkbook.Names.Add Name:="count", RefersToR1C1:= x TerryK . |
All times are GMT +1. The time now is 09:41 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com