ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Activesheet < Sheets("Name") (https://www.excelbanter.com/excel-programming/334464-activesheet-sheets-name.html)

Etrnal168

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 typ
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 shado
of the box; like a trail of the message box. Is there a way t
eliminate that?

Thanks

--
Etrnal16
-----------------------------------------------------------------------
Etrnal168's Profile: http://www.excelforum.com/member.php...fo&userid=2513
View this thread: http://www.excelforum.com/showthread.php?threadid=38700


Bob Phillips[_6_]

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" wrote
in message ...

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




Jim Thomlinson[_4_]

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



Etrnal168[_2_]

Activesheet < Sheets("Name")
 

can someone help

--
Etrnal16
-----------------------------------------------------------------------
Etrnal168's Profile: http://www.excelforum.com/member.php...fo&userid=2513
View this thread: http://www.excelforum.com/showthread.php?threadid=38700


Etrnal168[_3_]

Activesheet < Sheets("Name")
 

Wow, great.

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

-Thomas


--
Etrnal168
------------------------------------------------------------------------
Etrnal168's Profile: http://www.excelforum.com/member.php...o&userid=25135
View this thread: http://www.excelforum.com/showthread...hreadid=387005



All times are GMT +1. The time now is 06:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com