View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
mohavv mohavv is offline
external usenet poster
 
Posts: 68
Default goto function in macro 2

Hi,

I probably didn't express myself enough, so I give it another try.

Casus:
sheet 1 cell A1 contains following: =sheet3!D19

I want to use GOTO (F5) with the contents of A1 to go to that cell

I thought this would do it, but unfortunately not.

Sub Macro1()

Dim tmp As String

tmp = Range("a1").Formula

Application.Goto Reference:=tmp

End Sub

When I add this the A4 text becomes: text =sheet3!D19

Range("A4").Formula = "text " & tmp

What am I doing wrong?

Cheers,

Harold