View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.newusers
Walter Briscoe Walter Briscoe is offline
external usenet poster
 
Posts: 279
Default Evaluating formula in VBA

In message of Thu,
11 Jun 2009 22:06:01 in microsoft.public.excel.newusers, Shane
Devenshire writes
Hi,

A little more detail would help - if this formula were "prefix" & A1
"suffix" then if A1 was 27 the answer would be prefix27suffix.

Is that really what you want?



Thank you for being willing to help.

Yes! Gary''s Student pointed me at Evaluate() in another posting and has
completely answered the question from my perspective.

To put the question in context:
I have a cell which contains a hyperlink call. I want to extract the
link location, evaluate it and use it in the following pseudo-code:
set IE - CreateObject("InternetExplorer.Application")
IE.Navigate2 evaluation
Write data extracted from IE document to other cells.

If my cell is "=hyperlink(""prefix"" & a1 & ""suffix"", ""name"")",
I construct a formula to evaluate "prefix" & a1 & "suffix".
I did not know about the evaluate() function.
I was misled by VBA F1 - help.
--
Walter Briscoe