PC Review


Reply
Thread Tools Rate Thread

Code not working on another comp

 
 
G
Guest
Posts: n/a
 
      28th May 2004
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 With Quote
 
 
 
 
Frank Kabel
Guest
Posts: n/a
 
      28th May 2004
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 With Quote
 
Tushar Mehta
Guest
Posts: n/a
 
      28th May 2004
In article <1447901c444d6$c67f5420$(E-Mail Removed)>,
(E-Mail Removed) 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
 
Reply With Quote
 
G
Guest
Posts: n/a
 
      28th May 2004
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 With Quote
 
G
Guest
Posts: n/a
 
      28th May 2004
It says:

Runtime Error "9"
Subscript out of Range

We are both using XL 2002

>-----Original Message-----
>In article <1447901c444d6$c67f5420$(E-Mail Removed)>,
>(E-Mail Removed) 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
>.
>

 
Reply With Quote
 
Tom Ogilvy
Guest
Posts: n/a
 
      28th May 2004
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" <(E-Mail Removed)> wrote in message
news:146a001c444db$2f4f28a0$(E-Mail Removed)...
> 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 With Quote
 
G
Guest
Posts: n/a
 
      28th May 2004
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" <(E-Mail Removed)> wrote in message
>news:146a001c444db$2f4f28a0$(E-Mail Removed)...
>> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help getting comp working geekdna Windows XP Help 5 27th Aug 2009 07:28 PM
MOBO power light on but comp not working? cpu? Joel Computer Hardware 4 25th May 2007 12:18 AM
comp freezes and stop working playing Sims 2, GTA etc =?Utf-8?B?amFwYW5fYWRkaWN0Z2lybA==?= Windows XP Games 2 21st Nov 2005 04:25 PM
intel.microprocessors.pentium, comp.sys.intel, comp.hardware, alt.comp.hardware.homebuilt, alt.comp.hardware.pc-homebuilt, alt.comp.mainboards.abit J Higbee DIY PC 3 24th Jun 2004 04:03 PM
misc.taxes,comp.dcom.wan,comp.graphics.api.opengl,comp.home.automation,comp.sys.ibm.pc.hardware.storage . Storage Devices 0 19th Jun 2004 09:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:16 AM.