Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am trying to write a macro in excel. I am trying to use the container method. Dim x As Object Dim xx xx = UCase(ActiveWorkbook.Name) 'This works Worksheets("Sheet1").Activate Set x = ActiveWorkbook.Container 'Get error at this line The error is: Run time error 1004. Application-defined or object-defined error Does any one know why this would happen? Regards, AA |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Pukya,
Your objectives are unclear - please explain. However, from VBA help on the Container method: '----------------------- Use this property with a contained workbook to return the container object. If the container doesn't support OLE Automation or the workbook isn't embedded, this property fails. '----------------------- --- Regards, Norman wrote in message ups.com... Hi, I am trying to write a macro in excel. I am trying to use the container method. Dim x As Object Dim xx xx = UCase(ActiveWorkbook.Name) 'This works Worksheets("Sheet1").Activate Set x = ActiveWorkbook.Container 'Get error at this line The error is: Run time error 1004. Application-defined or object-defined error Does any one know why this would happen? Regards, AA |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See response in excel.misc.
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) wrote in message ups.com... Hi, I am trying to write a macro in excel. I am trying to use the container method. Dim x As Object Dim xx xx = UCase(ActiveWorkbook.Name) 'This works Worksheets("Sheet1").Activate Set x = ActiveWorkbook.Container 'Get error at this line The error is: Run time error 1004. Application-defined or object-defined error Does any one know why this would happen? Regards, AA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't get ActiveWorkbook.Container to work | Excel Programming | |||
Workbook container - can't get it to work | Excel Programming | |||
Container property | Excel Programming | |||
OLE Container Control in VB.NET | Excel Programming | |||
Iterate over Collection Objects in Container. | Excel Programming |