Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Problem with hidden file

I an using Windows 98 and Excel 2000.

Following are the first few lines of code of a program that runs at night
unattended. If "quotes.xls" happens to have been hidden when Excel was last
closed then line 3 opens it as a hidden file and this program stalls when
the code ( line 4) tries to activate one of the several sheets in the file
..
Application.DisplayAlerts = False
Application.AskToUpdateLinks = False
Workbooks.Open "d:/allyears/quotes.xls"
Worksheets("Current Quotes").Activate

I have tried to follow the "open" instruction with every version of
"visible" I can think of without success.

Can someone help me with this problem?

Thanks.

Jim


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default Problem with hidden file

Hi Jim

how about adding the line
Windows("quotes.xls").Visible = True
and then just to be sure that it is activated
Workbooks("quotes.xls").activate
in after the .Open line

Cheers
JulieD

"jim simpson" wrote in message
news:5zTDd.69916$Jk5.17274@lakeread01...
I an using Windows 98 and Excel 2000.

Following are the first few lines of code of a program that runs at night
unattended. If "quotes.xls" happens to have been hidden when Excel was
last
closed then line 3 opens it as a hidden file and this program stalls when
the code ( line 4) tries to activate one of the several sheets in the
file
.
Application.DisplayAlerts = False
Application.AskToUpdateLinks = False
Workbooks.Open "d:/allyears/quotes.xls"
Worksheets("Current Quotes").Activate

I have tried to follow the "open" instruction with every version of
"visible" I can think of without success.

Can someone help me with this problem?

Thanks.

Jim




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Problem with hidden file

Have you tried

Windows("Quotes.xls").Visible = True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"jim simpson" wrote in message
news:5zTDd.69916$Jk5.17274@lakeread01...
I an using Windows 98 and Excel 2000.

Following are the first few lines of code of a program that
runs at night
unattended. If "quotes.xls" happens to have been hidden when
Excel was last
closed then line 3 opens it as a hidden file and this program
stalls when
the code ( line 4) tries to activate one of the several sheets
in the file
.
Application.DisplayAlerts = False
Application.AskToUpdateLinks = False
Workbooks.Open "d:/allyears/quotes.xls"
Worksheets("Current Quotes").Activate

I have tried to follow the "open" instruction with every
version of
"visible" I can think of without success.

Can someone help me with this problem?

Thanks.

Jim




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Problem with hidden file

Dim wkbk As Workbook

Application.DisplayAlerts = False
Application.AskToUpdateLinks = False
Set wkbk = Workbooks.Open("d:\allyears\quotes.xls")

wkbk.Windows(1).Visible = True
wkbk.Activate
wkbk.Worksheets("Current Quotes").Activate

may work ok.

(I changed your slashes to backslashes--excel is forgiving, but I'm not <vbg.)



jim simpson wrote:

I an using Windows 98 and Excel 2000.

Following are the first few lines of code of a program that runs at night
unattended. If "quotes.xls" happens to have been hidden when Excel was last
closed then line 3 opens it as a hidden file and this program stalls when
the code ( line 4) tries to activate one of the several sheets in the file
.
Application.DisplayAlerts = False
Application.AskToUpdateLinks = False
Workbooks.Open "d:/allyears/quotes.xls"
Worksheets("Current Quotes").Activate

I have tried to follow the "open" instruction with every version of
"visible" I can think of without success.

Can someone help me with this problem?

Thanks.

Jim


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Problem with hidden file

Thanks to all for the help. I've screwed-up on this before. I never think of
windows as having a file name, I always think of it as a sheet name. Got to
get my thinking straight.

Jim


"jim simpson" wrote in message
news:5zTDd.69916$Jk5.17274@lakeread01...
I an using Windows 98 and Excel 2000.

Following are the first few lines of code of a program that runs at night
unattended. If "quotes.xls" happens to have been hidden when Excel was

last
closed then line 3 opens it as a hidden file and this program stalls when
the code ( line 4) tries to activate one of the several sheets in the

file
.
Application.DisplayAlerts = False
Application.AskToUpdateLinks = False
Workbooks.Open "d:/allyears/quotes.xls"
Worksheets("Current Quotes").Activate

I have tried to follow the "open" instruction with every version of
"visible" I can think of without success.

Can someone help me with this problem?

Thanks.

Jim




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
Hidden Column A Problem G Excel Discussion (Misc queries) 2 March 4th 10 04:30 PM
Hidden sheet problem Freshman Excel Worksheet Functions 0 October 23rd 07 03:17 PM
Excel. I am having a problem with hidden text SHR77 Excel Discussion (Misc queries) 1 November 22nd 05 04:03 PM
Excel Workbook Hidden Problem GIScoobe Excel Programming 2 January 6th 05 01:15 AM
Hidden hyperlinks giving me a problem... llagun01 Excel Programming 0 May 6th 04 01:48 AM


All times are GMT +1. The time now is 01:00 PM.

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

About Us

"It's about Microsoft Excel"