Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If I want to save the value of a "constant", I'd do something like this:
CELLS (i,"A").Value = "=MATCH(""WTD HRS"",""'[""&RC6&""]""&sname""'""'!R7)" How do I write the results of this as a constant that is not saved in the workbook. Thanks, Barb Reinhardt |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good Morning Barb
I believe this is what your looking for. Declare constant first by: Public Const stMatch as String = "=MATCH(""WTD HRS"",""'[""&RC6&""]""&sname""'""'!R7)" or Const stMatch as String = "=MATCH(""WTD HRS"",""'[""&RC6&""]""&sname""'""'!R7)" then you can save constant into string variable or you can save it into a cell as you have in your example. Either way works just fine. Also check out usinf Static variables in VBA help. I hope this helped out. HTH Rick, (Fbks, AK {Land of the Midnight Sun}) "Barb Reinhardt" wrote in message ... If I want to save the value of a "constant", I'd do something like this: CELLS (i,"A").Value = "=MATCH(""WTD HRS"",""'[""&RC6&""]""&sname""'""'!R7)" How do I write the results of this as a constant that is not saved in the workbook. Thanks, Barb Reinhardt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
pasting info from workbook to sheet in another workbook | Excel Programming | |||
Declaring Constants that can be used throughout the Workbook :) | Excel Programming | |||
copy a set of names(constants) from 1 workbook to another | Excel Discussion (Misc queries) | |||
Shared Workbook - Defining Access Rights | Excel Worksheet Functions | |||
Excel Gurus = want a macro in 1 workbook to get info from another workbook = Read please | Excel Programming |