Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default cell reference help

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default cell reference help

I don't need it to go to A1 but to the sheet and cell
referenced in A1


-----Original Message-----

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


--
Don Guillett
SalesAid Software

"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



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default cell reference help

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



  #5   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default cell reference help

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



.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default cell reference help

Lets say the destination cell is in sheet1, no problem.
But if it is in sheet2...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



.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default cell reference help

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



.



  #8   Report Post  
Posted to microsoft.public.excel.programming
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


.



.

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default cell reference help

Only for you. So where do you think the error lies?

--
Regards,
Tom Ogilvy

"scrabtree" wrote in message
...
Lets say the destination cell is in sheet1, no problem.
But if it is in sheet2...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



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nesting a sheet name reference within a cell reference??? Broyston Excel Discussion (Misc queries) 9 July 8th 08 08:35 PM
Changing sheet reference to cell reference TeeJay Excel Worksheet Functions 3 October 19th 07 11:50 AM
absolute cell reference A spreadsheet cell reference that does no help Excel Discussion (Misc queries) 1 January 18th 06 06:56 PM
problem with cell reference in =sum(offset(cell reference,x,y,z,a)). Want cell ref to be variable. [email protected] Excel Worksheet Functions 2 December 11th 04 12:05 AM
Problem with =sum(offset(cell reference,w,x,y,z). I want cell reference to be variable [email protected] Excel Worksheet Functions 2 December 11th 04 12:00 AM


All times are GMT +1. The time now is 03:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"