ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditional load of form when entering a certain worksheet (https://www.excelbanter.com/excel-programming/314122-conditional-load-form-when-entering-certain-worksheet.html)

davo64

Conditional load of form when entering a certain worksheet
 

I'm pretty new to Excel VB and brand new to this forum. Hope someon
can help with my scenario.

I have a workbook with multiple worksheets. two particular sheets ge
data from other sheets. I want a form to open if the value of a cel
in that worksheet is not equal to zero. I enter the sheet (named dd
by clicking the tab at the bottom. in my mind i'm thinking:

on enter worksheet dd, if cell J55<0, then load Userform1

Userform1 is one I already created. Would I add the code under th
worksheet object or need to create a module or constantly runnin
macro???

Thanks.
Davo6

--
davo6
-----------------------------------------------------------------------
davo64's Profile: http://www.excelforum.com/member.php...fo&userid=1550
View this thread: http://www.excelforum.com/showthread.php?threadid=27077


Bob Phillips[_6_]

Conditional load of form when entering a certain worksheet
 
Private Sub Worksheet_Activate()
If Me.Range("J55").Value < 0 Then
Show UserForm1
End If
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--

HTH

RP

"davo64" wrote in message
...

I'm pretty new to Excel VB and brand new to this forum. Hope someone
can help with my scenario.

I have a workbook with multiple worksheets. two particular sheets get
data from other sheets. I want a form to open if the value of a cell
in that worksheet is not equal to zero. I enter the sheet (named dd)
by clicking the tab at the bottom. in my mind i'm thinking:

on enter worksheet dd, if cell J55<0, then load Userform1

Userform1 is one I already created. Would I add the code under the
worksheet object or need to create a module or constantly running
macro???

Thanks.
Davo64


--
davo64
------------------------------------------------------------------------
davo64's Profile:

http://www.excelforum.com/member.php...o&userid=15504
View this thread: http://www.excelforum.com/showthread...hreadid=270778




Bob Phillips[_6_]

Conditional load of form when entering a certain worksheet
 
Sorry that should be Userform1.Show

--

HTH

RP

"davo64" wrote in message
...

I'm pretty new to Excel VB and brand new to this forum. Hope someone
can help with my scenario.

I have a workbook with multiple worksheets. two particular sheets get
data from other sheets. I want a form to open if the value of a cell
in that worksheet is not equal to zero. I enter the sheet (named dd)
by clicking the tab at the bottom. in my mind i'm thinking:

on enter worksheet dd, if cell J55<0, then load Userform1

Userform1 is one I already created. Would I add the code under the
worksheet object or need to create a module or constantly running
macro???

Thanks.
Davo64


--
davo64
------------------------------------------------------------------------
davo64's Profile:

http://www.excelforum.com/member.php...o&userid=15504
View this thread: http://www.excelforum.com/showthread...hreadid=270778





All times are GMT +1. The time now is 10:08 AM.

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