Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Unable to mark the range in VB and get application error- WHY


D/MARK

IT WORKED JUST FINE. ANOTHER COOL ONE TO USE IN THE RANGE OPTION.

THNKS AND WITH THIS I SHOULD CONSIDER THE THREAD CLOSED WITH A NICE FEELING
OF MAKING PROGRESS AND THANKING MR. NAT, MIKE AND SANDY MAN FOR THE GUIDANCE.

BRGDS/CAPTGNVR

"Mark Ivey" wrote:

Consider this....

If I fully understand your request, give this snippet a go...


Mark



LastRow = Range("A5").End(xlDown).ROW

Range("A5:E" & LastRow).Select









"CAPTGNVR" wrote in message
...
DEAR ALL

Active cell is A5. I need to select the range from 5th row to the last
populated cell which is obtained from xldown.row to 5 columns to the
right.

Public Sub LASTTROW()
LASTROW = ActiveCell.End(xlDown).Row
ActiveCell.Range(Cells(0, 0), Cells(LASTROW, 5)).Select
End Sub

What is wrong in this code to get run time error 1004-
'application-defined
or object defined error'.

or sugest VB to mark from the active cell to last populated row and 5
columns to the right.

pls help-captgnvr


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
Unable to set the Display Alerts property of the application class PhilM[_2_] Excel Programming 6 June 29th 07 11:45 AM
Hiding Rows Error - "Runtime Error 1004 - Unable to set the hidden property of the range class" Punsterr Excel Programming 2 April 9th 07 05:32 PM
Unable to set the NumberFormat Property of the Range Class - ERROR Jon Delano Excel Programming 3 November 10th 04 07:33 PM
unable to close macro using auto_close or application.quit gloria Excel Programming 1 January 14th 04 07:50 AM
unable to set formulaarray of range class ERROR when using Conditional Sum John H.[_2_] Excel Programming 1 September 25th 03 09:55 PM


All times are GMT +1. The time now is 03:32 AM.

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

About Us

"It's about Microsoft Excel"