![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 12:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com