Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Code not working on another comp

I have this code:

Private Sub CommandButton30_Click()
Windows("SWITCHBOARD").Activate
End Sub

It just switches you to a different open workbook. It
works just fine on my computer, but is doesn't work on a
co-workers computer. He has Excel 2002, the security is
set to Trust Access to Visual Basic Projects, but it just
sends you the de-bug message.
Help?
G

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Code not working on another comp

Hi
what does this message say?
- maybe the other file is not open?

--
Regards
Frank Kabel
Frankfurt, Germany


G wrote:
I have this code:

Private Sub CommandButton30_Click()
Windows("SWITCHBOARD").Activate
End Sub

It just switches you to a different open workbook. It
works just fine on my computer, but is doesn't work on a
co-workers computer. He has Excel 2002, the security is
set to Trust Access to Visual Basic Projects, but it just
sends you the de-bug message.
Help?
G

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Code not working on another comp

It says:

Runtime Error "9"
Subscript out of Range

SWITCHBOARD is definately open because a button on
SWITCHBOARD opens the SOURCE2 workbook...the code that's
not working is to return you from SOURCE2 back to
SWITCHBOARD...it isn't supposed to close SOURCE2, it just
sends you back to SWITCHBOARD.
I tried it with Select instead of Activate and it still
won't work.
Thanks,
G

-----Original Message-----
Hi
what does this message say?
- maybe the other file is not open?

--
Regards
Frank Kabel
Frankfurt, Germany


G wrote:
I have this code:

Private Sub CommandButton30_Click()
Windows("SWITCHBOARD").Activate
End Sub

It just switches you to a different open workbook. It
works just fine on my computer, but is doesn't work on a
co-workers computer. He has Excel 2002, the security is
set to Trust Access to Visual Basic Projects, but it

just
sends you the de-bug message.
Help?
G

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Code not working on another comp

It says:

Runtime Error "9"
Subscript out of Range

We are both using XL 2002

-----Original Message-----
In article ,
says...
I have this code:

Private Sub CommandButton30_Click()
Windows("SWITCHBOARD").Activate
End Sub

It just switches you to a different open workbook. It
works just fine on my computer, but is doesn't work on

a
co-workers computer. He has Excel 2002, the security

is
set to Trust Access to Visual Basic Projects, but it

just
sends you the de-bug message.
Help?
G


*What* message?

What version of XL are you using?

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Code not working on another comp

change it to

Windows("SWITCHBOARD.XLS").Activate

Using the extension will always work. Not using the extension works
dependent on a setting under windows folder options about showing known
extensions I believe.

--
Regards,
Tom Ogilvy

"G" wrote in message
...
It says:

Runtime Error "9"
Subscript out of Range

SWITCHBOARD is definately open because a button on
SWITCHBOARD opens the SOURCE2 workbook...the code that's
not working is to return you from SOURCE2 back to
SWITCHBOARD...it isn't supposed to close SOURCE2, it just
sends you back to SWITCHBOARD.
I tried it with Select instead of Activate and it still
won't work.
Thanks,
G

-----Original Message-----
Hi
what does this message say?
- maybe the other file is not open?

--
Regards
Frank Kabel
Frankfurt, Germany


G wrote:
I have this code:

Private Sub CommandButton30_Click()
Windows("SWITCHBOARD").Activate
End Sub

It just switches you to a different open workbook. It
works just fine on my computer, but is doesn't work on a
co-workers computer. He has Excel 2002, the security is
set to Trust Access to Visual Basic Projects, but it

just
sends you the de-bug message.
Help?
G

.



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Code not working on another comp

That did it!!
Wow, another weird little quirkey thing to remember.
Thank you so much for your help.
G

-----Original Message-----
change it to

Windows("SWITCHBOARD.XLS").Activate

Using the extension will always work. Not using the

extension works
dependent on a setting under windows folder options about

showing known
extensions I believe.

--
Regards,
Tom Ogilvy

"G" wrote in message
...
It says:

Runtime Error "9"
Subscript out of Range

SWITCHBOARD is definately open because a button on
SWITCHBOARD opens the SOURCE2 workbook...the code that's
not working is to return you from SOURCE2 back to
SWITCHBOARD...it isn't supposed to close SOURCE2, it

just
sends you back to SWITCHBOARD.
I tried it with Select instead of Activate and it still
won't work.
Thanks,
G

-----Original Message-----
Hi
what does this message say?
- maybe the other file is not open?

--
Regards
Frank Kabel
Frankfurt, Germany


G wrote:
I have this code:

Private Sub CommandButton30_Click()
Windows("SWITCHBOARD").Activate
End Sub

It just switches you to a different open workbook.

It
works just fine on my computer, but is doesn't work

on a
co-workers computer. He has Excel 2002, the

security is
set to Trust Access to Visual Basic Projects, but it

just
sends you the de-bug message.
Help?
G
.



.

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
Sports Comp Ladder tabulating help needed shaunl Excel Worksheet Functions 12 January 29th 14 01:25 PM
Converting XP Excel spreadsheets from 2007 to Macintosh (MAC) comp Kia Excel Discussion (Misc queries) 1 September 25th 08 09:27 PM
IF/AND Statements in Comp Calculator BobVA Excel Worksheet Functions 15 May 31st 06 05:07 PM
saving the history of recently used excel documentsto another comp McRiggen Excel Discussion (Misc queries) 1 December 21st 05 12:36 AM
Round error on home comp Dave Peterson[_3_] Excel Programming 2 July 12th 03 04:38 PM


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