Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to format an Excel worksheet from within Access XP, and I'm
having a few leetle problems. The main one is that the Save method is not saving the updated workbook. The following code manages to open the workbook, and I can see the format changes happening on the screen, but the updated workbook is not saved: Public Sub FormatWorksheet(strExcelFilePath As String) Dim objXLApp As Excel.Application Dim objXLBook As Excel.Workbook Dim objXLSheet As Excel.Worksheet Dim objXLRangeHeader As Excel.Range Set objXLBook = GetObject(strExcelFilePath) Set objXLSheet = objXLBook.Worksheets(1) Set objXLRangeHeader = objXLSheet.Range("A1:M1") Set objXLApp = objXLBook.Parent objXLApp.Visible = True objXLSheet.Visible = True objXLRangeHeader.Font.Bold = True objXLRangeHeader.WrapText = True objXLSheet.Columns("A:M").AutoFit objXLBook.Save objXLBook.Close End Sub Any help would be appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
close workbook without saving or promt to save | Excel Discussion (Misc queries) | |||
Formula updates with SAVE AS | Excel Worksheet Functions | |||
no updates prompt at opening and save changes at closing | Excel Discussion (Misc queries) | |||
Workbook updates | Excel Discussion (Misc queries) | |||
a protected cell w/formula only updates only on file save? | Excel Discussion (Misc queries) |