Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() A couple of years ago, when I did a GETOBJECT on an Excel Workbook fro VB6, Excel would display while my program was operating on it. Now I can't make Excel display while under a VB6 app program. But, more importantly, when my VB6 app saves the workbook and I the bring it up directly under Excel, the worksheets are hidden and I hav to click "unhide" a couple of times to get the worksheets to b visible. I have tried MySheet.visible = true and that has no effect. Thanks for kind advice. Lamon -- Lamon ----------------------------------------------------------------------- Lamont's Profile: http://www.officehelp.in/member.php?userid=502 View this thread: http://www.officehelp.in/showthread.php?t=125599 Posted from - http://www.officehelp.i |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The worksheets (all but one) are hidden ?
Or the Workbook window is hidden ? If you are working on the file from VB6 when it is hidden and then save it, it will remain hidden when opened in Excel. Depends what you VB6 code is doing...... NickHK "Lamont" wrote in message ... A couple of years ago, when I did a GETOBJECT on an Excel Workbook from VB6, Excel would display while my program was operating on it. Now I can't make Excel display while under a VB6 app program. But, more importantly, when my VB6 app saves the workbook and I then bring it up directly under Excel, the worksheets are hidden and I have to click "unhide" a couple of times to get the worksheets to be visible. I have tried MySheet.visible = true and that has no effect. Thanks for kind advice. Lamont -- Lamont ------------------------------------------------------------------------ Lamont's Profile: http://www.officehelp.in/member.php?userid=5022 View this thread: http://www.officehelp.in/showthread.php?t=1255993 Posted from - http://www.officehelp.in |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thank you for responding to my question "How to make worksheet saved i VB6 visible?" When I run Excel and then open the workbook just operated on by VB6 the title bar of the window says "Book1" and there is no data in th spreadsheet. Then on the toolbar I click Window | Unhide and a list box appear showing my workbook. I click that, and then the first worksheet appears, with the othe worksheets tabs showing. All these worksheets were in the workbook before VB6 operated on it. As each worksheet is created, it is set to be visible. Private InventoryBook As Excel.Workbook Private SheetNoDups As Excel.Worksheet ... Set InventoryBook = GetObject(....file specification for the workboo ....) Set SheetNoDups = InventoryBook.worksheeets("ImageNot") SheetNoDups.Visible = xlSheetVisible After operations on the data, the program ends ... InventoryBook.Save InventoryBook.Close Set InventoryBook = Nothing The xlSheetVisible setting appears to have no affect. Previously I was using SheetNoDups.Visible = True and that had n effect. Apparently the .Visible property works for VBA procs under Excel, bu not in VB6 automation of Excel. Thanks for kind consideration. Lamon -- Lamon ----------------------------------------------------------------------- Lamont's Profile: http://www.officehelp.in/member.php?userid=502 View this thread: http://www.officehelp.in/showthread.php?t=125599 Posted from - http://www.officehelp.i |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Lamont,
There is a difference between the WS being visible and the window of the WB being visible. In your case, it sounds like the first is true but the latter is false. If you record a macro whilst unhiding the window, you will get the code needed to add to your VB6 code, before you .save the excel file. NickHK "Lamont" wrote in message ... Thank you for responding to my question "How to make worksheet saved in VB6 visible?" When I run Excel and then open the workbook just operated on by VB6, the title bar of the window says "Book1" and there is no data in the spreadsheet. Then on the toolbar I click Window | Unhide and a list box appears showing my workbook. I click that, and then the first worksheet appears, with the other worksheets tabs showing. All these worksheets were in the workbook before VB6 operated on it. As each worksheet is created, it is set to be visible. Private InventoryBook As Excel.Workbook Private SheetNoDups As Excel.Worksheet ... Set InventoryBook = GetObject(....file specification for the workbook ...) Set SheetNoDups = InventoryBook.worksheeets("ImageNot") SheetNoDups.Visible = xlSheetVisible After operations on the data, the program ends ... InventoryBook.Save InventoryBook.Close Set InventoryBook = Nothing The xlSheetVisible setting appears to have no affect. Previously I was using SheetNoDups.Visible = True and that had no effect. Apparently the .Visible property works for VBA procs under Excel, but not in VB6 automation of Excel. Thanks for kind consideration. Lamont -- Lamont ------------------------------------------------------------------------ Lamont's Profile: http://www.officehelp.in/member.php?userid=5022 View this thread: http://www.officehelp.in/showthread.php?t=1255993 Posted from - http://www.officehelp.in |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks, I smacked my forhead and said "I shoulda had a V8" when yo reminded me about generating the code with the macro. But, I'm no home yet. The macro generated a single line of code. Windows("HomeStorageInventory.xls").Visible = True I tried this line just after the Get Object statement with variations(see below), and all fail on "subscript out of range." strPathXLS = "C:\Documents and Settings\CQA\M Documents\09AdminReference\AAHomeStorage\" strXLSSpec = strPathXLS & "HomeStorageInventory.xls" Set InventoryBook = GetObject(strXLSSpec) 'Windows(strXLSSpec).Visible = True 'Try with full file spe fails 'Windows(InventoryBook.Name).Visible = True 'Try with symbo fails Windows("HomeStorageInventory.xls").Visible = True 'Try per X macro fails InventoryBook does not have a "Visible" property. So, I'm stumped. Best regards, Lamon -- Lamon ----------------------------------------------------------------------- Lamont's Profile: http://www.officehelp.in/member.php?userid=502 View this thread: http://www.officehelp.in/showthread.php?t=125599 Posted from - http://www.officehelp.i |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How about
InventoryBook.Windows(1).Visible=true NickHK "Lamont" wrote in message ... Thanks, I smacked my forhead and said "I shoulda had a V8" when you reminded me about generating the code with the macro. But, I'm not home yet. The macro generated a single line of code. Windows("HomeStorageInventory.xls").Visible = True I tried this line just after the Get Object statement with 3 variations(see below), and all fail on "subscript out of range." strPathXLS = "C:\Documents and Settings\CQA\My Documents\09AdminReference\AAHomeStorage\" strXLSSpec = strPathXLS & "HomeStorageInventory.xls" Set InventoryBook = GetObject(strXLSSpec) 'Windows(strXLSSpec).Visible = True 'Try with full file spec fails 'Windows(InventoryBook.Name).Visible = True 'Try with symbol fails Windows("HomeStorageInventory.xls").Visible = True 'Try per XL macro fails InventoryBook does not have a "Visible" property. So, I'm stumped. Best regards, Lamont -- Lamont ------------------------------------------------------------------------ Lamont's Profile: http://www.officehelp.in/member.php?userid=5022 View this thread: http://www.officehelp.in/showthread.php?t=1255993 Posted from - http://www.officehelp.in |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I make a drop down box visible within a worksheet? | Excel Worksheet Functions | |||
I need to make MS word visible..please help | Excel Programming | |||
Worksheet has to set to visible as it is not visible after saving and closing Excel by VB. | Excel Programming | |||
better search: "make worksheet visible" | Excel Discussion (Misc queries) | |||
How select all pictures in a worksheet and make visible? | Excel Programming |