Using ActiveWorkBook.Container
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
|