Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default VBA NEWBIE Need A Bit of Help

Am just starting to learn a bit about VBA & Hoping someone can offer some
help.

have a worksheet with a table say 5 columns wide by 10 rows, however could
at times have more rows

i want to insert an object in the first row UNDER the table's Last Row

i have been able to do that easily when the table is a fixed size and the
row number is always the same, but i can't figure out how to make my code
identify which is the last row of the table and go to the next row below
that

TIA for any help

WC
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default VBA NEWBIE Need A Bit of Help

hi
number of ways to work this...
if you want to know the row number...
Dim r As Long
r = Cells(Rows.Count, "a").End(xlUp).Row
MsgBox r
Range("A" & r + 1).Select

or if the row number isn't important to what your are doing..
bottom up method....
range("A65536").end(xlup).offset(1,0).select

or if you have a solid block of data, go the other way....
top down method....
range("A1").end(xldown).offset(1,0).select

regards
FSt1




"Wile Coyote" wrote:

Am just starting to learn a bit about VBA & Hoping someone can offer some
help.

have a worksheet with a table say 5 columns wide by 10 rows, however could
at times have more rows

i want to insert an object in the first row UNDER the table's Last Row

i have been able to do that easily when the table is a fixed size and the
row number is always the same, but i can't figure out how to make my code
identify which is the last row of the table and go to the next row below
that

TIA for any help

WC

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default VBA NEWBIE Need A Bit of Help

?B?RlN0MQ==?= wrote in
:

Thank You ..... Works great!


hi
number of ways to work this...
if you want to know the row number...
Dim r As Long
r = Cells(Rows.Count, "a").End(xlUp).Row
MsgBox r
Range("A" & r + 1).Select

or if the row number isn't important to what your are doing..
bottom up method....
range("A65536").end(xlup).offset(1,0).select

or if you have a solid block of data, go the other way....
top down method....
range("A1").end(xldown).offset(1,0).select

regards
FSt1




"Wile Coyote" wrote:

Am just starting to learn a bit about VBA & Hoping someone can offer
some help.

have a worksheet with a table say 5 columns wide by 10 rows, however
could at times have more rows

i want to insert an object in the first row UNDER the table's Last
Row

i have been able to do that easily when the table is a fixed size
and the row number is always the same, but i can't figure out how to
make my code identify which is the last row of the table and go to
the next row below that

TIA for any help

WC


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
Real Newbie newbie question Dave New Users to Excel 0 January 10th 07 07:55 PM
Newbie help pls Ciara Excel Programming 5 August 11th 06 11:58 AM
Newbie Help. Is this possible? taltos1 Excel Discussion (Misc queries) 5 November 12th 05 04:40 PM
Very newbie Man Utd Excel Programming 1 June 14th 05 07:42 AM
ADO newbie help please Mike NG Excel Programming 0 July 23rd 03 03:10 PM


All times are GMT +1. The time now is 04:57 AM.

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"