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


To all,

I wrote some code in an excel file that was on my network drive which
works perfectly for me. However, when a colleague tries to use the
file the program is halted because of a subscript error. This is the
line where the problem occurs:

Application.Workbooks("Loss Reduction Worksheet -
Working").Sheets("Switchboard").Activate

At this point in the program, a new excel file is created and
information is taken for the original document and analyzed in the new
document.

I never have any problems with the program which leads me to believe
that I must have changed the settings or loaded an add-in on my excel
application which my colleague hasn't done. But for the life of me, I
can't figure out how adjust my colleagues settings so that the program
works (that is if that is the case).

Any suggestions would be much appreciated.

Thanks,
Peter


--
PGalla06
------------------------------------------------------------------------
PGalla06's Profile: http://www.excelforum.com/member.php...o&userid=24260
View this thread: http://www.excelforum.com/showthread...hreadid=493417

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Excel settings

You should include the 'xls' extension on the workbook name.

Application.Workbooks("Loss Reduction Worksheet - Working"). _
Sheets("Switchboard").Activate

should be

Application.Workbooks("Loss Reduction Worksheet - Working.xls").
_
Sheets("Switchboard").Activate

Whether the xls extension is required is based on a Windows
Explorer setting. It is always safe to include it.


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







"PGalla06"
wrote in message
...

To all,

I wrote some code in an excel file that was on my network drive
which
works perfectly for me. However, when a colleague tries to use
the
file the program is halted because of a subscript error. This
is the
line where the problem occurs:

Application.Workbooks("Loss Reduction Worksheet -
Working").Sheets("Switchboard").Activate

At this point in the program, a new excel file is created and
information is taken for the original document and analyzed in
the new
document.

I never have any problems with the program which leads me to
believe
that I must have changed the settings or loaded an add-in on my
excel
application which my colleague hasn't done. But for the life
of me, I
can't figure out how adjust my colleagues settings so that the
program
works (that is if that is the case).

Any suggestions would be much appreciated.

Thanks,
Peter


--
PGalla06
------------------------------------------------------------------------
PGalla06's Profile:
http://www.excelforum.com/member.php...o&userid=24260
View this thread:
http://www.excelforum.com/showthread...hreadid=493417



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel settings


Chip,

Thanks. You're a life saver. That fix worked perfectly.

Regards,
Pete

--
PGalla0
-----------------------------------------------------------------------
PGalla06's Profile: http://www.excelforum.com/member.php...fo&userid=2426
View this thread: http://www.excelforum.com/showthread.php?threadid=49341

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
Settings for pop up alerts in excel Victor Excel Discussion (Misc queries) 2 July 27th 07 08:52 PM
TAB Settings in Excel Abhi Excel Discussion (Misc queries) 0 October 5th 05 10:33 AM
Excel settings.... Jonas Setting up and Configuration of Excel 7 August 15th 05 10:43 PM
Excel startup settings cush Excel Programming 4 May 10th 05 07:18 PM
Excel page settings Rafi Excel Discussion (Misc queries) 3 December 15th 04 10:07 PM


All times are GMT +1. The time now is 04:17 AM.

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"