![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Location: Venezuela
Posts: 13
|
Dear friends:
would you please tell me why this function: Worksheets("recetas").Range("B1", Range("B1")._ End(xlDown)).Select doesn´t work for the selection of all the rows in the column four that have data. After use it I get the message: Application-defined or object-defined error |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Huntington Beach, CA USA
Posts: 327
|
Hi jboges,
What exactly are you trying to accomplish? can you explain a little more? James |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
Delete the underscore before the End
Worksheets("recetas").Range("B1", Range("B1").End(xlDown)).Select worked for me. |
|
|
|
|
|
#4 | |
|
New Member
Join Date: Apr 2002
Location: Venezuela
Posts: 13
|
Quote:
|
|
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
Are you trying to call this from another worksheet, or with another worksheet as the active sheet?
The referencing might be difficult in that instance, so it may be better to select the sheet before selecting the range. Sheets("racetas").Select Range("B1", Range("B1").End(xlDown)).Select This worked for me. |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Apr 2002
Location: Arizona
Posts: 68
|
I think a had a similar problem -- this was my solution, although I'm not sure it was the best one:
Code:
ActiveWorkbook.Sheets("data").Rows(lastrow).Select
Range(Selection, Selection.End(xlUp)).Select
gl |
|
|
|
|
|
#7 | |
|
New Member
Join Date: Apr 2002
Location: Venezuela
Posts: 13
|
Quote:
|
|
|
|
|
|
|
#8 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
It's not real clear what you are trying to do???
Your Post: "I am trying to select all the rows in the column number 4 to do an operation after that ( change one character for another one with REPLACE). Please consider that I know that the underscore is only for the separation of the statment in two rows." This will select the used range in the fourth column... Worksheets("racetas").UsedRange.Columns(4).Select Tom _________________ Found a solution? If so, please post again so members of this board can spend their time helping others. Better still, edit your topic(intitial post), by tagging on a word or phrase such as, "Problem Solved", or "Resolved". Thanks for being courteous! [ This Message was edited by: TsTom on 2002-05-07 06:03 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|