Hi,

I am a n00b with programming VBA for Excel. There are three issues that I seem to be having with my code. I am writing code that will ultimately create multiple worksheet graphs at the click of a button to save time in the future.

(1)

My first issue is deleting worksheets that are ALREADY in existence in the workbook. These worksheets have been created earlier by the code I wrote. I have triple checked and the worksheet names are not misspelled. I wrote this code so that if there is a problem with any of the graphs, the values can be changed and then the graphs be remade. Here is the code:

Private Sub delete_graph_sheets_Click()

' delete worksheets
    Application.DisplayAlerts = False
    Worksheets("3.1 - Blender Speed").Delete
    Worksheets("3.2 - Hot Cup Density").Delete
    Worksheets("3.3 - Viscosity").Delete
    Application.DisplayAlerts = True

End Sub
I get the error:
Run-time error '9':
Subscript out of range


... with the line "Worksheets("3.1 - Blender Speed").Delete" highlighted yellow during debug. An "ActiveX" button is used to initiate the code from the worksheet called "3.0 - Surface - Emulsion".

(2)

My second issue is more or less one of no information. I read up on how to print files off. However, I was wondering if it is possible to have the VBA code print the file as an Adobe file, printing off every worksheet at once. Also, when printing the file as an adobe file (by selecting "Adobe PDF" as the printer, as opposed to selecting "print to file") is it possible to choose "Adobe PDF Document Properties" and change the "Default Settings" of the "Adobe PDF Settings" tab all using the VBA code?

(3)

My final issue seems to be documented well, but I cannot seem to get it to work. I am attempting to use the following code to move specific worksheets (the active one) to a NEW workbook (order doesn't matter as I can use code to sort them when they have all been added):

' copy chart to new workbook
    ActiveSheet.Move Before:=Workbooks("Book1.xlsx").Sheets(1)
Where Book1.xlsx is the default "new", yet uncreated and unopened workbook I wish to send the newly created worksheets to. Also, is it possible to just create all of my charts and then have them sent to the new workbook at once? Once again, the charts are not embedded and take their own worksheet up.

Thanks to everyone for their time and help.