Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Page set up from VB6
I have a Visual Basic 6 program thet outputs data to an
excell work sheet, but get an error when trying to set the page up prior to printing: err 1004: Unable to set the printArea property of the PageSetup class Can someone please help? Many thanks. Dim objXL As Object Dim objWB As Object Dim objWS As Object Set objXL = CreateObject("Excel.Application") Set objWB = objXL.Workbooks.Add Set objWS = objWB.ActiveSheet sRange = "A1:H" & iXrow objWS.PageSetup.PrintArea = sRange objWS.PageSetup.PrintGridlines = True objWS.PageSetup.Orientation = xlLandscape objWS.Range("A1:H1").Interior.ColorIndex = 15 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving Excel 2010 files as web page or single file web page | Excel Discussion (Misc queries) | |||
Format page number in excel footer to start at a specific page # | Excel Discussion (Misc queries) | |||
How do I do page breaks when view menu doesnt page break preview | Excel Discussion (Misc queries) | |||
change and/or remove page number watermark in page break preview | Excel Discussion (Misc queries) | |||
How do I print a one page spreadsheet multiple time, each with its own page number? | Excel Discussion (Misc queries) |