From an Excel spreadsheet, using ActiveX command button to create a new workbook with data from current workbook.

pingme89

Board Regular
Joined
Jan 23, 2014
Messages
170
Office Version
  1. 365
Platform
  1. Windows
I have created a pricing estimator in Excel. I want to be able to click on an ActiveX command button to generate a new Workbook and name it the client's name in Cell F3.

On the same worksheet as the ActiveX command button, I have an estimate.

Column A = Quantity
Column B = Item
Column C = Price
Column D = Item subtotal ( Column A x Column C)

Cell F3 has Client name
Cell F5 has Client address
Cell F7 has Client Telephone number
Cell F9 has today's date

Ideally, I would like to have the item subtotals be total once all the line items are copied to the new workbook.
In the upper left corner I would like to have the client name, address, and telephone number to be placed.
I would need the headers, "QTY", "Item", "Price", "Subtotal" and the data from the original price estimator sheet to be populated under those column headings.

Since the price estimator workbook is always being used and new values would always be created, I can't have the new workbook link to the price estimator. I just need the values to be copied to the new spreadsheet.

I was only able to create a new workbook and name it but I am lost from there on.
Can someone help me with this?

Private Sub Estimate_Click()
Dim Estimate As String


Estimate = ActiveWorkbook.Worksheets("Chosen Package Parts List").Range("F3").Value
Workbooks.Add
ActiveWorkbook.SaveAs Filename:=Estimate & ".xls"
End Sub
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,214,791
Messages
6,121,611
Members
449,038
Latest member
apwr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top