+ Reply to Thread
Results 1 to 5 of 5

Activesheet <> Sheets("Name")

  1. #1
    Registered User
    Join Date
    07-11-2005
    Posts
    9

    Activesheet <> Sheets("Name")

    Hello guys, can I get some help with macros?

    I am trying to write a line that says

    If activesheet <> Sheets("blahblah") then
    exit sub

    But of course, that didn't work. What should be the correct code?

    Also, sometimes when show the user an input box asking them to type something then select OK or Cancel, when the users try to move the box, the box doesn't refresh and their entire screen ends up with the shadow of the box; like a trail of the message box. Is there a way to eliminate that?

    Thanks!

  2. #2
    Registered User
    Join Date
    07-11-2005
    Posts
    9
    can someone help?

  3. #3
    Bob Phillips
    Guest

    Re: Activesheet <> Sheets("Name")

    On the first

    If Activesheet.Name = "blahblahblah" Then

    On the second, did you turn ScreenUpdating off before the Inputbox?


    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Etrnal168" <[email protected]> wrote
    in message news:[email protected]...
    >
    > Hello guys, can I get some help with macros?
    >
    > I am trying to write a line that says
    >
    > If activesheet <> Sheets("blahblah") then
    > exit sub
    >
    > But of course, that didn't work. What should be the correct code?
    >
    > Also, sometimes when show the user an input box asking them to type
    > something then select OK or Cancel, when the users try to move the box,
    > the box doesn't refresh and their entire screen ends up with the shadow
    > of the box; like a trail of the message box. Is there a way to
    > eliminate that?
    >
    > Thanks!
    >
    >
    > --
    > Etrnal168
    > ------------------------------------------------------------------------
    > Etrnal168's Profile:

    http://www.excelforum.com/member.php...o&userid=25135
    > View this thread: http://www.excelforum.com/showthread...hreadid=387005
    >




  4. #4
    Jim Thomlinson
    Guest

    RE: Activesheet <> Sheets("Name")

    If activesheet.name <> Sheets("blahblah").name then

    The shadow can be removed by turning the screen updating back on just prior
    to the input box and back off just after the input box. You need to ensure
    that you have not moved your cursor or changed sheets to do this... otherwise
    the entire screen will change at the inputbox.
    --
    HTH...

    Jim Thomlinson


    "Etrnal168" wrote:

    >
    > Hello guys, can I get some help with macros?
    >
    > I am trying to write a line that says
    >
    > If activesheet <> Sheets("blahblah") then
    > exit sub
    >
    > But of course, that didn't work. What should be the correct code?
    >
    > Also, sometimes when show the user an input box asking them to type
    > something then select OK or Cancel, when the users try to move the box,
    > the box doesn't refresh and their entire screen ends up with the shadow
    > of the box; like a trail of the message box. Is there a way to
    > eliminate that?
    >
    > Thanks!
    >
    >
    > --
    > Etrnal168
    > ------------------------------------------------------------------------
    > Etrnal168's Profile: http://www.excelforum.com/member.php...o&userid=25135
    > View this thread: http://www.excelforum.com/showthread...hreadid=387005
    >
    >


  5. #5
    Registered User
    Join Date
    07-11-2005
    Posts
    9
    Wow, great.

    Thank you very much Jim and Bob for the help! Appreciate it.

    -Thomas

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1