ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   user form triggered by selection change (https://www.excelbanter.com/excel-programming/383107-user-form-triggered-selection-change.html)

littleme

user form triggered by selection change
 
Hi!
Am a bit of a usrform/ vba newbie so dont even know if im in the right
forum, but here goes anyway. The problem I have is this:

Would like for a userform to pop-up when the selection january!F4 is
changed. The userform will ask user to fill in the dates for that
years holidays. Depending whether its a half-day or whole day, the
entries should populate Info!A1 and Info!B1 respectively.

The userform would only used once a year.

Grateful for any help.


Tom Ogilvy

user form triggered by selection change
 
You would use the change event for Sheet January


Right click on the sheet tab of January and select view code

Put in code like

Private Sub Worksheet_Change(ByVal Target As Range)
if Target.Address = "$F$4" then
userform1.show
End if
End Sub

Now you need to construct Userform1 to take the actions you describe.

http://www.visualbasicforum.com/show...409#post594409


http://support.microsoft.com/?id=168067
XL97: WE1163: "Visual Basic Examples for Controlling UserForms"

Microsoft(R) Visual Basic(R) for Applications Examples for Controlling
UserForms in Microsoft Excel 97

This Application Note is an introduction to manipulating UserForms in
Microsoft Excel 97. It includes examples and Microsoft Visual Basic for
Applications macros that show you how to take advantage of the capabilities
of UserForms and use each of the ActiveX controls that are available for
UserForms

http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.

http://support.microsoft.com/kb/244761/en-us
XL2000: How to Use ADO to Return Data to a ListBox or ComboBox


http://support.microsoft.com/default.aspx?kbid=161514
XL97: How to Use a UserForm for Entering Data

http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data

--
Regards,
Tom Ogilvy


"littleme" wrote in message
oups.com...
Hi!
Am a bit of a usrform/ vba newbie so dont even know if im in the right
forum, but here goes anyway. The problem I have is this:

Would like for a userform to pop-up when the selection january!F4 is
changed. The userform will ask user to fill in the dates for that
years holidays. Depending whether its a half-day or whole day, the
entries should populate Info!A1 and Info!B1 respectively.

The userform would only used once a year.

Grateful for any help.





All times are GMT +1. The time now is 07:50 PM.

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