Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good morning,
I have a sheet called "main", in this sheet there are 8 drop down menues. Once all of the selections have been made a sheet called "BOM" has all of the materials needed for the desired selection ( lets say we are building a computer, the "BOM" sheet automatically generates what you need for that computer depending on the configurations you have chosen in the "main" sheet), now once the person makes their selection a nomenclature appears (i.e pc_xp_sp2) in the "main" sheet. I would like to have a button so when the person presses it creates a new workbook (being able to choose the name for the new workbook would be great but not necessary), once this button is pressed it creates a new workbook but also takes the nomenclature and puts it as the name for the new tab in the newly created workbook, this new tab would have what was in the "BOM" in the original workbook. Once the button is pressed and has created the new work book with the new tab, I would like the user to have the option to make a new selection with the drop down menues, and have a second button so this button will copy and paste the new "BOM" (everytime new selections are made the "BOM" is updated) sheet to a new tab in the newly created workbook (with the new nomenclature name). I would like the user to have the abililty to do this as many times as possible, each time creating a new tab with the nomenclature in the same newly created workbook, unless he/she wants a new workbook and presses button 1. I hope this makes sense, and would highly appreciate your help. Thank you in advance, TG |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Option Explicit
Dim wb As Workbook Sub AddToBook() Dim ws As Worksheet If wb Is Nothing Then Set wb = Workbooks.Add(xlWBATWorksheet) Set ws = wb.ActiveSheet Else Set ws = wb.Worksheets.Add End If ws.Name = ThisWorkbook.Worksheets("Main").Range("B8").Value ThisWorkbook.Activate End Sub "TG" wrote: Good morning, I have a sheet called "main", in this sheet there are 8 drop down menues. Once all of the selections have been made a sheet called "BOM" has all of the materials needed for the desired selection ( lets say we are building a computer, the "BOM" sheet automatically generates what you need for that computer depending on the configurations you have chosen in the "main" sheet), now once the person makes their selection a nomenclature appears (i.e pc_xp_sp2) in the "main" sheet. I would like to have a button so when the person presses it creates a new workbook (being able to choose the name for the new workbook would be great but not necessary), once this button is pressed it creates a new workbook but also takes the nomenclature and puts it as the name for the new tab in the newly created workbook, this new tab would have what was in the "BOM" in the original workbook. Once the button is pressed and has created the new work book with the new tab, I would like the user to have the option to make a new selection with the drop down menues, and have a second button so this button will copy and paste the new "BOM" (everytime new selections are made the "BOM" is updated) sheet to a new tab in the newly created workbook (with the new nomenclature name). I would like the user to have the abililty to do this as many times as possible, each time creating a new tab with the nomenclature in the same newly created workbook, unless he/she wants a new workbook and presses button 1. I hope this makes sense, and would highly appreciate your help. Thank you in advance, TG |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to enable Copy/Paste on protected work sheet? | New Users to Excel | |||
why will my copy and paste button not work | Excel Worksheet Functions | |||
Auto copy/ paste on relevant work sheet when selecting list item | Excel Programming | |||
During filling Excel Sheet copy/paste in Explorer does not work | Excel Programming | |||
Spin button in a work sheet - how do I make it work? | Excel Worksheet Functions |