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 / New Users / October 2004

Tip: Looking for answers? Try searching our database.

HOW CAN I RECORD A MACRO AND FILL THE DOWN A SHEET LIKE A FORMALA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
NME - 29 Sep 2004 13:15 GMT
CAN U RECORD A MACRO ASSIGN TO A BUTTON AND CUT AND PASTE IT TO A DIFFERANT ROW
IE:  THE MACRO IS ASSIGNED TO A BUTTON NEXT TO A4
THE MACRO COPYS A1 TO A2
I WANT TO COPY THIS MACRO TO A BUTTON NEXT TO B4 AND THE MACRO WILL COPY B1
TO B2 (LIKE USING THE FILL DOWN TO COPY A FORMULA)
- 29 Sep 2004 16:21 GMT
hi,
you can't copy and paste macros. At least like i think you
are asking.
you will have to record a new macro and assign it to a new
button.

>-----Original Message-----
>CAN U RECORD A MACRO ASSIGN TO A BUTTON AND CUT AND PASTE IT TO A DIFFERANT ROW
[quoted text clipped - 3 lines]
>TO B2 (LIKE USING THE FILL DOWN TO COPY A FORMULA)
>.
swatsp0p - 29 Sep 2004 19:11 GMT
First, please don't use all caps in your posts, as it is considered rude
(like shouting).  Thank you.

Second, your request can be accomplished by using the Visual Basic Editor
(Alt+F11 to open).  In the upper left pane of the VBA editor, locate the
VBAProject that contains your buttons (expand the '+' if needed).  Double
click on Sheet1 (or whichever sheet has your buttons).  In the pane to the
right, click on the Down Arrow of the left hand box (General) and click on
the CommandButton1 item.  This will open the macro you have assigned to this
button.  Highlight the portion of the command you wish to copy, press Ctrl+C.
Next click on CommandButton2 in the dropdown box and paste your script
between the "Private..." and the "End Sub" lines.  Edit this macro so that
references to "A1" and "A2" say "B1 and "B2".

Hope this helps.

> hi,
> you can't copy and paste macros. At least like i think you
[quoted text clipped - 11 lines]
> >TO B2 (LIKE USING THE FILL DOWN TO COPY A FORMULA)
> >.
VENKAT - 01 Oct 2004 07:08 GMT
slightly modify the macro using vba language and give row no. or cell as  
inputbox. type this code in vbeditor (alt+F11. remove xxxx from my email  
address.

Option Explicit
Public Sub test()
Dim cell As Range
Set cell = Range(InputBox("type the cell address for example a1 or A2 etc.  
and click ok"))
cell.Offset(0, 1) = cell
End Sub

On Wed, 29 Sep 2004 08:21:42 -0700, <anonymous@discussions.microsoft.com>  
wrote:

> hi,
> you can't copy and paste macros. At least like i think you
[quoted text clipped - 11 lines]
>> TO B2 (LIKE USING THE FILL DOWN TO COPY A FORMULA)
>> .

Signature

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

 
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.