Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / February 2007

Tip: Looking for answers? Try searching our database.

Open workbook to same worksheet and next empty row

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
inta251 - 24 Feb 2007 17:46 GMT
To open workbook to same worksheet I using macro

Private Sub Workbook_Open()
    Sheets (“trips”).Select
End Sub

Is that possible add to this macro,
open to the next empty row or next empty cell in Column A?

Thanks in advance.
Sincerely, Igor. (inta251)
Gord Dibben - 24 Feb 2007 19:16 GMT
Amended code below assuming no blanks in column A

Private Sub Workbook_Open()
    Sheets (“trips”).Select
ActiveSheet.Cells(Rows.Count, 1).End(xlUp) _
           .Offset(1, 0).Select
End Sub

Assuming first blank cell down.

Private Sub Workbook_Open()
   Sheets("trips").Select
Range("A1").End(xlDown).Offset(1, 0).Select
End Sub

>Is that possible add to this macro,
>open to the next empty row or next empty cell in Column A?
>
>Thanks in advance.
>Sincerely, Igor. (inta251)

Gord Dibben  MS Excel MVP
inta251 - 24 Feb 2007 20:00 GMT
Thanks for respond.
Both formulas working for me perfectooo.
THANKS again.
Good weekend.
Sincrely, Igor (inta251)

>Private Sub Workbook_Open()
>    Sheets ("trips").Select
>ActiveSheet.Cells(Rows.Count, 1).End(xlUp) _
>            .Offset(1, 0).Select
>End Sub

>Private Sub Workbook_Open()
>    Sheets("trips").Select
>Range("A1").End(xlDown).Offset(1, 0).Select
>End Sub
ShaneDevenshire - 24 Feb 2007 19:17 GMT
Yes but we really have to know the data layout.  Suppose that before the next
empty row there is data in all the cells of column A, then the code would be
[A1].End(XLDown).Offset(1,0).Select

Signature

Cheers,
Shane Devenshire

> To open workbook to same worksheet I using macro
>
[quoted text clipped - 7 lines]
> Thanks in advance.
> Sincerely, Igor. (inta251)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.