Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CODING ERRor N.F[_2_] Excel Discussion (Misc queries) 1 June 27th 07 09:02 PM
VBA Coding Error sdg8481 Excel Programming 12 July 26th 06 04:05 AM
Help with coding error carlos Excel Programming 3 June 5th 06 11:42 AM
Run-time error '1004' on Range.Activate Don Rouse Excel Programming 9 August 25th 05 04:05 PM
coding error tom mcdonald Excel Programming 2 June 16th 05 04:04 PM


All times are GMT +1. The time now is 07:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"