Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default How to Active Window

I want to know how can I active a window. I have the statement written (see
below) ,however, it is not working. The "Progname" is already open with
another files and I want the "Progname" to be the active one when the macro
is done.

Thanks advance.
Maperalia

"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Progname = "S:\GEOTEST\shears\" & WO & "\" & Boring & " " & "@" & " " &
depth & ".xls"
Windows(Progname).Activate

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default How to Active Window

Workbooks(Progname).Activate

"maperalia" wrote:

I want to know how can I active a window. I have the statement written (see
below) ,however, it is not working. The "Progname" is already open with
another files and I want the "Progname" to be the active one when the macro
is done.

Thanks advance.
Maperalia

"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Progname = "S:\GEOTEST\shears\" & WO & "\" & Boring & " " & "@" & " " &
depth & ".xls"
Windows(Progname).Activate

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default How to Active Window

LGWhiz;
Thanks for the quick response. I put the statement you gave me (
Workbooks(Progname).Activate ) a I got the following error message:

Run-Time error'9':
Subscript out of range

What does it mean?

Maperlia


"JLGWhiz" wrote:

Workbooks(Progname).Activate

"maperalia" wrote:

I want to know how can I active a window. I have the statement written (see
below) ,however, it is not working. The "Progname" is already open with
another files and I want the "Progname" to be the active one when the macro
is done.

Thanks advance.
Maperalia

"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Progname = "S:\GEOTEST\shears\" & WO & "\" & Boring & " " & "@" & " " &
depth & ".xls"
Windows(Progname).Activate

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default How to Active Window

Run-Time error'9':
Subscript out of range

What does it mean?


That means that there is no window with a caption equal to the contents of
the 'Progname' variable.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"maperalia" wrote in message
...
LGWhiz;
Thanks for the quick response. I put the statement you gave me (
Workbooks(Progname).Activate ) a I got the following error message:

Run-Time error'9':
Subscript out of range

What does it mean?

Maperlia


"JLGWhiz" wrote:

Workbooks(Progname).Activate

"maperalia" wrote:

I want to know how can I active a window. I have the statement written
(see
below) ,however, it is not working. The "Progname" is already open with
another files and I want the "Progname" to be the active one when the
macro
is done.

Thanks advance.
Maperalia

"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Progname = "S:\GEOTEST\shears\" & WO & "\" & Boring & " " & "@" & " " &
depth & ".xls"
Windows(Progname).Activate


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default How to Active Window

Chip'
Thanks for your response.
Could you please lead me to solve it?

Thanks.
Maperalia

"Chip Pearson" wrote:

Run-Time error'9':
Subscript out of range

What does it mean?


That means that there is no window with a caption equal to the contents of
the 'Progname' variable.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"maperalia" wrote in message
...
LGWhiz;
Thanks for the quick response. I put the statement you gave me (
Workbooks(Progname).Activate ) a I got the following error message:

Run-Time error'9':
Subscript out of range

What does it mean?

Maperlia


"JLGWhiz" wrote:

Workbooks(Progname).Activate

"maperalia" wrote:

I want to know how can I active a window. I have the statement written
(see
below) ,however, it is not working. The "Progname" is already open with
another files and I want the "Progname" to be the active one when the
macro
is done.

Thanks advance.
Maperalia

"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Progname = "S:\GEOTEST\shears\" & WO & "\" & Boring & " " & "@" & " " &
depth & ".xls"
Windows(Progname).Activate




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default How to Active Window

Chip;
Thanks very much I got it. Basically I followed your advice that "there is
no window with a caption equal to the contents of the 'Progname' variable".
Therefore, I typed the the following content instead:
"" & WO & "\" & Boring & " " & "@" & " " & depth & ".xls"
and it is working perfectly.
Thanks again for your help.

Maperalia






"Chip Pearson" wrote:

Run-Time error'9':
Subscript out of range

What does it mean?


That means that there is no window with a caption equal to the contents of
the 'Progname' variable.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"maperalia" wrote in message
...
LGWhiz;
Thanks for the quick response. I put the statement you gave me (
Workbooks(Progname).Activate ) a I got the following error message:

Run-Time error'9':
Subscript out of range

What does it mean?

Maperlia


"JLGWhiz" wrote:

Workbooks(Progname).Activate

"maperalia" wrote:

I want to know how can I active a window. I have the statement written
(see
below) ,however, it is not working. The "Progname" is already open with
another files and I want the "Progname" to be the active one when the
macro
is done.

Thanks advance.
Maperalia

"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Progname = "S:\GEOTEST\shears\" & WO & "\" & Boring & " " & "@" & " " &
depth & ".xls"
Windows(Progname).Activate


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
missing Active Window bar Gomer Fackworth New Users to Excel 4 May 28th 08 02:13 PM
Re-size active window blackbox via OfficeKB.com Excel Programming 2 June 19th 07 10:20 AM
update active window vj5 Excel Programming 1 August 3rd 06 08:15 AM
Active Window Question CWillis Excel Discussion (Misc queries) 4 July 19th 06 05:52 PM
active window Gerry Excel Programming 2 December 17th 04 03:33 PM


All times are GMT +1. The time now is 07:44 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"