Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Coding question
Hi, I have designed a UserForm which is used to add new members but thi form would be used to edit and delete them as well. So instead o creating another identical UserForm, I would like to use this one. PROBLEM - I have at the moment code that places todays date in a text bo automatically but it is editable if a member joined before the dat they enter it onto the system. This would need to be disabled, so that when viewing a member details the date joined would not be overriden. - The caption on the form would change, and an extra button 'Delete should appear. Is it possible to set a variable or something so if variable = add the this if not then this -- bac ----------------------------------------------------------------------- bach's Profile: http://www.excelforum.com/member.php...fo&userid=2613 View this thread: http://www.excelforum.com/showthread.php?threadid=46864 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Coding question
You can execute commands to make these alterations in appearance in the
Initialize event. -- Regards, Tom Ogilvy "bach" wrote in message ... Hi, I have designed a UserForm which is used to add new members but this form would be used to edit and delete them as well. So instead of creating another identical UserForm, I would like to use this one. PROBLEMS - I have at the moment code that places todays date in a text box automatically but it is editable if a member joined before the date they enter it onto the system. This would need to be disabled, so that when viewing a members details the date joined would not be overriden. - The caption on the form would change, and an extra button 'Delete' should appear. Is it possible to set a variable or something so if variable = add then this if not then this. -- bach ------------------------------------------------------------------------ bach's Profile: http://www.excelforum.com/member.php...o&userid=26134 View this thread: http://www.excelforum.com/showthread...hreadid=468641 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Coding question
Thanks, put an if statement in the event procedure to deal with the to forms ? -- bach ------------------------------------------------------------------------ bach's Profile: http://www.excelforum.com/member.php...o&userid=26134 View this thread: http://www.excelforum.com/showthread...hreadid=468641 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Coding question
In a general module, where you will have code to call the form, put in a
public variable at the very top of the module outside any procedure. Public FormType as Long Sub Macro1 FormType = 2 Userform5.show End Sub in the initialize event for the form Private Sub Userform_Initialize() Select Case FormType Case 1 ' Data entry ' Case 2 ' Data Editing Textbox1.Enabled = False Case 3 ' Date display End Select End Sub as an example. -- Regards, Tom Ogilvy "bach" wrote in message ... Thanks, put an if statement in the event procedure to deal with the to forms ? -- bach ------------------------------------------------------------------------ bach's Profile: http://www.excelforum.com/member.php...o&userid=26134 View this thread: http://www.excelforum.com/showthread...hreadid=468641 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Coding question
Ok, I think I got ya will try it out tomrow. Thanks will reply if i have an issue. Also can you, explain why this doesnt work. I have a peace of cod that works in 2002 not in 2003 txtdatejoined.value = date in 2003 this does not work? -- bac ----------------------------------------------------------------------- bach's Profile: http://www.excelforum.com/member.php...fo&userid=2613 View this thread: http://www.excelforum.com/showthread.php?threadid=46864 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro/VB coding question | Excel Discussion (Misc queries) | |||
visual basic coding question | Excel Discussion (Misc queries) | |||
Coding best practice question | Excel Programming | |||
Automating Autofill Coding Question | Excel Programming | |||
coding question | Excel Programming |