PC Review


Reply
Thread Tools Rate Thread

Ad row with button

 
 
Dennis
Guest
Posts: n/a
 
      6th Nov 2006
Can i make a button on a sheet to ad a row under the row where the button
in is? And by using the same button again another row under the earlier
inserted row? And if possible with auto numbering.

How does that works?

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
 
Reply With Quote
 
 
 
 
Ron de Bruin
Guest
Posts: n/a
 
      6th Nov 2006
If you use a button from the Forms toolbar you can assign this macro to it

Sub test()
Dim Rw As Long
Rw = ActiveSheet.Shapes(Application.Caller).TopLeftCell.Row
End Sub

Rw is the row number of the topleftcell now
See if you can use this

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Dennis" <(E-Mail Removed)> wrote in message newsp.tilzfgdjgj945k@y9a2q7...
> Can i make a button on a sheet to ad a row under the row where the button in is? And by using the same button again another row
> under the earlier inserted row? And if possible with auto numbering.
>
> How does that works?
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



 
Reply With Quote
 
Dennis
Guest
Posts: n/a
 
      6th Nov 2006
I can`t get it working. I attached the code to the button but it won`t
work so i do something wrong. How do i assign the macro best to the button?

> If you use a button from the Forms toolbar you can assign this macro to
> it
>
> Sub test()
> Dim Rw As Long
> Rw = ActiveSheet.Shapes(Application.Caller).TopLeftCell.Row
> End Sub
>
> Rw is the row number of the topleftcell now
> See if you can use this
>




--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Button.Click event doesn't fire when clicking button in formView.InsertItemTemplate Andy B. Microsoft ASP .NET 0 25th Nov 2009 03:27 PM
How to trap User quitting by clicking on the X button or Exit Access menu button? Rick Microsoft Access 5 14th Feb 2008 07:03 PM
Inspector doesn't change Save-Button to Send-Button when adding recipients via VB HarryWild Microsoft Outlook Program Addins 0 16th Jan 2008 10:20 AM
hitting enter button while in textbox calls correct button's click event TS Microsoft ASP .NET 5 29th Nov 2005 01:54 AM
instead of right click as save on each file i want to have a select button to choose from and then a download button to get them all at once Jasonc Windows XP Help 0 21st Dec 2003 02:18 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:12 PM.