Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Button to generate report
Hi, I'm very new to VBA. I have a worksheet with 5 fields (a1-a2-a3-a4-a5). I
want to create a button that will generate a new file to make some sort of invoice with the name in cell a1 and the numbers in cells a2-a3-a4-a5. How can I do this? Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Button to generate report
The following macro takes the values in A1:A5 of the active sheet and copies
them to A1:A5 of the InventorySheet. Place a Forms button (View - Toolbars - Forms, click on the button icon and draw the button where you want it) and assign this macro to that button. Sub GenerateInvoice() With Sheets("InventorySheet") Range("A1:A5").Copy .Range("A1") End With End Sub Note that there is a space after the word "Copy". Place his macro in a normal module. HTH Otto "juniorc" wrote in message ... Hi, I'm very new to VBA. I have a worksheet with 5 fields (a1-a2-a3-a4-a5). I want to create a button that will generate a new file to make some sort of invoice with the name in cell a1 and the numbers in cells a2-a3-a4-a5. How can I do this? Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Button to generate report
Hi, begin recording a macro that does what you are trying to do. Then
add a command button and right click it change the name and caption properties to your suite your needs. Double click on the button (in design view) and the code window will pop up with similar code: Sub CommandButton1_Click() 'Enter the following line Call 'your macro name here' End Sub Hopefully, this gives you a place to start--Lonnie M. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help me to generate a report | New Users to Excel | |||
Can I generate a report for my classroom? (I APPRECIATE YOUR HELP | Excel Worksheet Functions | |||
Can I generate a report for my classroom? (I APPRECIATE YOUR HELP | Excel Worksheet Functions | |||
Generate Report | Excel Worksheet Functions | |||
How to Generate the Excel report By Using ASP | Excel Programming |