Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / June 2006

Tip: Looking for answers? Try searching our database.

Defining Constants from info in workbook

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Barb Reinhardt - 22 Jun 2006 18:04 GMT
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
Rick Hansen - 22 Jun 2006 18:42 GMT
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})

> If I want to save the value of a "constant", I'd do something like this:
>
[quoted text clipped - 5 lines]
> Thanks,
> Barb Reinhardt
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.