Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
how about something like this:
Sub test2() Dim wb1 As Workbook Dim shts As Long Dim fpath As String fpath = ActiveWorkbook.Path & "\" With Application shts = .SheetsInNewWorkbook .SheetsInNewWorkbook = 1 Workbooks.Add .SheetsInNewWorkbook = shts End With ActiveWorkbook.SaveAs Filename:=fpath & "test.xls" End Sub -- Gary "John" wrote in message ... How do I open and name a new workbook with only 1 worksheet in vb? I tried learning how using record macro but couldn't get things to work. thanks John |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to: Open closed workbook/Search data tables/Return data to open workbook | Excel Discussion (Misc queries) | |||
Opening Excel, Book1 opens, remains open with other workbook open | Excel Discussion (Misc queries) | |||
how do i open a data workbook when i open a timesheet workbook | Excel Discussion (Misc queries) | |||
Open a specific workbook...find value from other open workbook and then insert cells values in cell next to it. | Excel Programming | |||
How do you program so that Workbook B cannot be open unless Workbook A is open? Plus I need to validation | Excel Programming |