cell reference help

  • Thread starter Thread starter scrabtree
  • Start date Start date
S

scrabtree

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
 
try this instead. BTW the ,true will make it scroll from that point. If not
needed, you can delete that part.

Application.Goto sheets("sheet1").Range("A1"), True
 
I don't need it to go to A1 but to the sheet and cell
referenced in A1
 
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
 
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.
 
Lets say the destination cell is in sheet1, no problem.
But if it is in sheet2...error.
 
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.
 
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




.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top