Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi All I need to run a VBA macro in Business Objects that saves an excel file under a certain name - based upon todays date (i.e. filename&todaysdate&.xls) then opens that same file, and does a few basic formatting things to it in the background (i.e. removes all grid lines, zooms out to 85% etc). Whenever i try to do anything like this it seems to have problems with being an active application, or also when i record a macro and use the code from that to change zoom levels, it does that with the active window, and i dont know how to make excel the active window (id prefer not to have to make it active, and have it working in the background) Any suggestions would be brilliant. Thanks!!!! -- iambalrog ------------------------------------------------------------------------ iambalrog's Profile: http://www.excelforum.com/member.php...o&userid=26977 View this thread: http://www.excelforum.com/showthread...hreadid=553312 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() As above, the macro below works to save a file in Business Objects, then open it in an excel application, where i want to do some basic formatting changes. The changes i cnat make it do are removing gridlines, and changing the zoom settings it say 85%, as when i record a macro these are done using the 'activewindow' aspect - and i cant make excel the active window!!! (have left the activewindow.gridlines in as an example, but it wont work.) Sub GoodrichExport() ActiveDocument.SaveAs ("\\lvl-x-user\Crossgate Shared Area\Corporate Sales\Tim\" & "Tim" & "_" & Format(Date, "yymmdd") & ".xls") Set xlsApp = CreateObject("Excel.Application") xlsApp.Visible = True xlsApp.Workbooks.Open ("\\lvl-x-user\Crossgate Shared Area\Corporate Sales\Tim\" & "Tim" & "_" & Format(Date, "yymmdd") & ".xls") With xlsApp ..Worksheets("New").Activate ActiveWindow.DisplayGridlines = False End With End Sub -- iambalrog ------------------------------------------------------------------------ iambalrog's Profile: http://www.excelforum.com/member.php...o&userid=26977 View this thread: http://www.excelforum.com/showthread...hreadid=553312 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Removing patterns without removing gridlines | Excel Discussion (Misc queries) | |||
Restoring Excel gridlines after removing background shading? | Excel Discussion (Misc queries) | |||
Removing Gridlines | Excel Discussion (Misc queries) | |||
removing gridlines in Excel spreadsheet | New Users to Excel | |||
Selectively removing gridlines in excel | Excel Discussion (Misc queries) |