Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Time Error on activate coding
I have a macro with a piece of coding in it that has always worked in the
past. It is a simple command to activate a workbook or a worksheet within a workbook. For example Workbooks("VAR Calc").Activate or Workbooks("VAR Calc").Worksheets("Historical VaR").Activate but now when I try and run the macro I get this very strange error message "Run time error '-2147352565 (8002000b)': Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus." and when I debug it shows that it gets stuck on the activation code. this is even more stragne a if I run the macro on another computer it seems to work. Any comments will be greatfully received. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Time Error on activate coding
Referenceing workbooks without their extension (e.g. .xls), as in:
Workbooks("VAR Calc").Activate will work on machines that have the Windows setting Folder Options View "Hide file extensions for known types" checked. However, this gives a subscript out of range error. What do you get for ?Workbooks("VAR Calc").Windows(1).Visible NickHK "Cammy" wrote in message ... I have a macro with a piece of coding in it that has always worked in the past. It is a simple command to activate a workbook or a worksheet within a workbook. For example Workbooks("VAR Calc").Activate or Workbooks("VAR Calc").Worksheets("Historical VaR").Activate but now when I try and run the macro I get this very strange error message "Run time error '-2147352565 (8002000b)': Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus." and when I debug it shows that it gets stuck on the activation code. this is even more stragne a if I run the macro on another computer it seems to work. Any comments will be greatfully received. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Time Error on activate coding
thanks Nick I have changed my settings and this solves the problem now.
:) "NickHK" wrote: Referenceing workbooks without their extension (e.g. .xls), as in: Workbooks("VAR Calc").Activate will work on machines that have the Windows setting Folder Options View "Hide file extensions for known types" checked. However, this gives a subscript out of range error. What do you get for ?Workbooks("VAR Calc").Windows(1).Visible NickHK "Cammy" wrote in message ... I have a macro with a piece of coding in it that has always worked in the past. It is a simple command to activate a workbook or a worksheet within a workbook. For example Workbooks("VAR Calc").Activate or Workbooks("VAR Calc").Worksheets("Historical VaR").Activate but now when I try and run the macro I get this very strange error message "Run time error '-2147352565 (8002000b)': Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus." and when I debug it shows that it gets stuck on the activation code. this is even more stragne a if I run the macro on another computer it seems to work. Any comments will be greatfully received. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
CODING ERRor | Excel Discussion (Misc queries) | |||
VBA Coding Error | Excel Programming | |||
Help with coding error | Excel Programming | |||
Run-time error '1004' on Range.Activate | Excel Programming | |||
coding error | Excel Programming |