View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
scrabtree[_2_] scrabtree[_2_] is offline
external usenet poster
 
Posts: 47
Default cell reference help

That did it
-----Original Message-----
I was on sheet2, the information in sheet1 and the

destination in sheet3.

No problem for me. If you put it in a sheet module then

you will have
problems, but in a general module, no problems.

--
Regards,
Tom Ogilvy

wrote in message
...
It is still giving me the same error. If the cell it is
trying to go to is in Sheet 1, no problem. If it is in
Sheet 2....error.


-----Original Message-----
Sub find()
Application.Goto Range(Range("Sheet1!A1").Value),

True
End Sub




Sub DefineCellAddress()
MyCellAddr = "''" & ActiveCell.Parent.Name & "'!" &

ActiveCell.Address
Worksheets("Sheet1").Range("A1").Value = MyCellAddr
End Sub

worked fine for me.

I made and adjustment to the first line of

DefineCellAddress

--
Regards,
Tom Ogilvy

"scrabtree" wrote

in message
...
The Sub Goto MyCell Aaddress () below keeps

returning an
run time error, application or object defined

error. I
also tried this and get the same error:

Sub find()
Application.Goto Range(Range("Sheet1!A1").Value),

True
End Sub




Public MyCellAddr As String
Sub DefineCellAddress()
MyCellAddr = "'" & ActiveCell.Parent.Name & "'!"

&
ActiveCell.address
Worksheets("Sheet1").Range("A1").Value =

MyCellAddr
End Sub
Sub GotoMyCellAaddress()
Range(MyCellAddr).Select
End Sub


.



.