Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Defining Constants from info in workbook

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Defining Constants from info in workbook

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pasting info from workbook to sheet in another workbook s_ali_hassan[_6_] Excel Programming 0 June 15th 06 01:48 PM
Declaring Constants that can be used throughout the Workbook :) eXcellence Excel Programming 4 June 30th 05 01:47 AM
copy a set of names(constants) from 1 workbook to another Rahul Excel Discussion (Misc queries) 3 June 20th 05 10:02 AM
Shared Workbook - Defining Access Rights gizmo Excel Worksheet Functions 0 January 13th 05 04:10 PM
Excel Gurus = want a macro in 1 workbook to get info from another workbook = Read please harry Excel Programming 5 December 20th 03 03:26 AM


All times are GMT +1. The time now is 11:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"