![]() |
embeded excel control doesn't work properly if excel workbook is open through GetObject("xx.xls")
1. i create the following VB code:
----------------------------------------- Dim myworkbook As Excel.Workbook myworkbook = GetObject("c:\temp\control.xls") myworkbook.Parent.Visible = True myworkbook.Parent.Windows("control.xls").Visible = True -------------------------------- The control.xls is very simple excel file which contains two check boxs controls. When the control.xls is open, the check value in the check box doesn't stay when you clicked other cells. One of reason might be that the GetObject("xcell file name") method creates a embeded workbook under the excel application, that may cause the embeded control under the embeded workbook doesn't work properly. Is there a way to make these embeded control work? Appreciate any help from your experts. Regards Zhiming *** Sent via Developersdex http://www.developersdex.com *** |
embeded excel control doesn't work properly if excel workbook is open through GetObject("xx.xls")
If you are using VB or VBA (not VB.Net) then "myworkbook = GetObject("c:\temp\control.xls")" is missing the Set statement required for all Objects. It should read... Set myworkbook = GetObject("c:\temp\control.xls") -- Jim Cone Portland, Oregon USA "Zhiming H" wrote in message 1. i create the following VB code: ----------------------------------------- Dim myworkbook As Excel.Workbook myworkbook = GetObject("c:\temp\control.xls") myworkbook.Parent.Visible = True myworkbook.Parent.Windows("control.xls").Visible = True -------------------------------- The control.xls is very simple excel file which contains two check boxs controls. When the control.xls is open, the check value in the check box doesn't stay when you clicked other cells. One of reason might be that the GetObject("xcell file name") method creates a embeded workbook under the excel application, that may cause the embeded control under the embeded workbook doesn't work properly. Is there a way to make these embeded control work? Appreciate any help from your experts. Regards Zhiming *** Sent via Developersdex http://www.developersdex.com *** |
embeded excel control doesn't work properly if excel workbook is open through GetObject("xx.xls")
Thanks, you're right if the code in VB. However My code is in VB.Net *** Sent via Developersdex http://www.developersdex.com *** |
All times are GMT +1. The time now is 02:41 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com