![]() |
continued help needed
Below is the current code I am using. If the "Goto" cell
in Sub find () is in Sheet1 then there is no problem. If the "Goto" cell is in Sheet2 I get a user defined/object defined error??? Public MyCellAddr As String Sub DefineCellAddress() MyCellAddr = "''" & ActiveCell.Parent.Name & "'!" & ActiveCell.address Worksheets("Sheet1").Range("A1").Value = MyCellAddr End Sub Sub find() Application.Goto Range(Range("Sheet1!A1").Value), True End Sub |
continued help needed
The code works fine - posting it over and over again without giving
information that could be used to tell you how to fix your problem is a waste of time. Just to waste some more time, I closed excel and opened it again. The new workbook has 3 sheets. I went to the vbe, did Insert=Module. Pasted your code in from the email with no modifications. went to sheet3, D6 and ran DefineCell address. I then went to each of the 3 sheets and ran "Find". In all cases, I ended up on Sheet3, D6. So the code works. The only problem could be where you placed it or some other fact about your workbook which isn't revealed by pasting the same code over and over. Do what I just described exactly and then say it doesn't work. (including what verion of excel). -- Regards, Tom Ogilvy "scrabtree" wrote in message ... Below is the current code I am using. If the "Goto" cell in Sub find () is in Sheet1 then there is no problem. If the "Goto" cell is in Sheet2 I get a user defined/object defined error??? Public MyCellAddr As String Sub DefineCellAddress() MyCellAddr = "''" & ActiveCell.Parent.Name & "'!" & ActiveCell.address Worksheets("Sheet1").Range("A1").Value = MyCellAddr End Sub Sub find() Application.Goto Range(Range("Sheet1!A1").Value), True End Sub |
continued help needed
T. Ogilvy...You are a very helpful and kind man. Thanks
for what you do. Sometimes I post on here and don't get a response at all. Sometimes I post on here and one person responds with information that isn't very helpful (yours is always great, by the way) and then I reply but no one answers. Sometimes I re-post days later. I guess I just need to be more patient. PS...my problem was I was testing the code in a sheet object rather than in module. I am getting better at this but still have a lot to learn. -----Original Message----- The code works fine - posting it over and over again without giving information that could be used to tell you how to fix your problem is a waste of time. Just to waste some more time, I closed excel and opened it again. The new workbook has 3 sheets. I went to the vbe, did Insert=Module. Pasted your code in from the email with no modifications. went to sheet3, D6 and ran DefineCell address. I then went to each of the 3 sheets and ran "Find". In all cases, I ended up on Sheet3, D6. So the code works. The only problem could be where you placed it or some other fact about your workbook which isn't revealed by pasting the same code over and over. Do what I just described exactly and then say it doesn't work. (including what verion of excel). -- Regards, Tom Ogilvy "scrabtree" wrote in message ... Below is the current code I am using. If the "Goto" cell in Sub find () is in Sheet1 then there is no problem. If the "Goto" cell is in Sheet2 I get a user defined/object defined error??? Public MyCellAddr As String Sub DefineCellAddress() MyCellAddr = "''" & ActiveCell.Parent.Name & "'!" & ActiveCell.address Worksheets("Sheet1").Range("A1").Value = MyCellAddr End Sub Sub find() Application.Goto Range(Range("Sheet1!A1").Value), True End Sub . |
continued help needed
It is usually better to stay in the same thread with the same problem.
Often a solution is developed in an evolutionary fashion. Also knowledge/important points gained earlier in a thread could be left out in a later posting. If that posting is done in a new thread, then new responders could spend time rediscovering what has already been established. Of course you can do whatever you want, but people could lose interest if they see their time is being wasted. If you post and don't get an answer it is usually because 1) the explanation is not clearly stated, or critical information is left out 2) the problem doesn't have an obvious solution or it is too involved 3) you are asking too much of people (example someone puts up 200 lines of code and says this doesn't work, what's wrong,-- or this runs slow can it be made to go faster; followed by 500 lines of recorded code -- or someone lays out a specification for a complete application with obviously no intent of personal involvement) 4) the question really isn't an excel question (such as questions that are primarily about emailling and the outlook object model, even though the code may be written in excel). 5) question is of the nature, "can this be done". Most people are hesitant to answer NO, because as soon as they do, someone will post a way to do it <g 6) the poster doesn't appear to have the resources to utilize suggested solutions 7) of course there are other reasons. -- Regards, Tom Ogilvy "scrabtreee" wrote in message ... T. Ogilvy...You are a very helpful and kind man. Thanks for what you do. Sometimes I post on here and don't get a response at all. Sometimes I post on here and one person responds with information that isn't very helpful (yours is always great, by the way) and then I reply but no one answers. Sometimes I re-post days later. I guess I just need to be more patient. PS...my problem was I was testing the code in a sheet object rather than in module. I am getting better at this but still have a lot to learn. -----Original Message----- The code works fine - posting it over and over again without giving information that could be used to tell you how to fix your problem is a waste of time. Just to waste some more time, I closed excel and opened it again. The new workbook has 3 sheets. I went to the vbe, did Insert=Module. Pasted your code in from the email with no modifications. went to sheet3, D6 and ran DefineCell address. I then went to each of the 3 sheets and ran "Find". In all cases, I ended up on Sheet3, D6. So the code works. The only problem could be where you placed it or some other fact about your workbook which isn't revealed by pasting the same code over and over. Do what I just described exactly and then say it doesn't work. (including what verion of excel). -- Regards, Tom Ogilvy "scrabtree" wrote in message ... Below is the current code I am using. If the "Goto" cell in Sub find () is in Sheet1 then there is no problem. If the "Goto" cell is in Sheet2 I get a user defined/object defined error??? Public MyCellAddr As String Sub DefineCellAddress() MyCellAddr = "''" & ActiveCell.Parent.Name & "'!" & ActiveCell.address Worksheets("Sheet1").Range("A1").Value = MyCellAddr End Sub Sub find() Application.Goto Range(Range("Sheet1!A1").Value), True End Sub . |
All times are GMT +1. The time now is 02:04 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com