Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 *** |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
In my Excel "active application add-ins" not properly enable | Excel Programming | |||
How to disable "New" "open" menu items in Excel 2007 | Excel Programming | |||
"Open With" Excel Does Not Work For TXT File Extension | Excel Discussion (Misc queries) | |||
Excel 2003: "Workbook.Open with URL does not work | Excel Programming | |||
Why doesn't "Workbook.Range("myrange").value" work? | Excel Programming |