Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set a Workbook Name from VB
Hi all,
I cannot manage to set a workbook name before save & close. This is my code: ###################################### Set appExcel = CreateObject("Excel.Application") With appExcel .WindowState = xlMaximized .SheetsInNewWorkbook = 3 .Add .DisplayAlerts = False End With appExcel.Workbooks(1).Name="MyFirstBook.xls" ###################################### Unfortunately, when executing the last instruction an error is raised, as this is a Read Only property. There's a default name which I need to custom, so I've searched for another one but they all seem to be Read Only ones!! How would you deal with it? Many thanks in advance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
loop through a column on a workbook copying data on each row to another workbook, then copy data back to the original workbook | Excel Programming | |||
Select sheet tabs in workbook & save to separate workbook files | Excel Worksheet Functions | |||
Running a macro to protect a workbook on a already protected workbook UNprotects the workbook ?? | Excel Programming | |||
Copy a range of cells in an unopened workbook and paste it to the current workbook | Excel Programming | |||
What commands do you use to name a workbook, save a workbook,open a workbook | Excel Programming |