Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Some simple questions:
1. How can I change the size of the characters in a selectionbox? 2. How can I force somebody to fill in a date in a textbox? I can do it with a cell but I couldn't manage it with a textbox. (If possible without the calander.xla because I tried but I never found out how to do this exactly) |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi bartman1980
1. What do you mean by selectionbox? If you mean Combobox, rightclick on the box -- properties. There you will find your font, click in the field and then on the "..." on the left side. 2. you could check it like that: Private Sub TextBox1_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean) If Not IsDate(Me.TextBox1.Value) And Me.TextBox1.Value < "" Then MsgBox "Please insert a date" Cancel = True End If End Sub hope that helps Carlo On Dec 18, 4:49 pm, bartman1980 wrote: Some simple questions: 1. How can I change the size of the characters in a selectionbox? 2. How can I force somebody to fill in a date in a textbox? I can do it with a cell but I couldn't manage it with a textbox. (If possible without the calander.xla because I tried but I never found out how to do this exactly) |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 18 dec, 08:59, carlo wrote:
hi bartman1980 1. What do you mean by selectionbox? If you mean Combobox, rightclick on the box -- properties. There you will find your font, click in the field and then on the "..." on the left side. 2. you could check it like that: Private Sub TextBox1_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean) If Not IsDate(Me.TextBox1.Value) And Me.TextBox1.Value < "" Then MsgBox "Please insert a date" Cancel = True End If End Sub hope that helps Carlo On Dec 18, 4:49 pm, bartman1980 wrote: Some simple questions: 1. How can I change the size of the characters in a selectionbox? 2. How can I force somebody to fill in a date in a textbox? I can do it with a cell but I couldn't manage it with a textbox. (If possible without the calander.xla because I tried but I never found out how to do this exactly)- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - Hi Carlo, 1.I ment the check box in the workset forms 2. I tried your code but nothing happend. Did you get it work? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bartman
1. the checkbox should also have a property called font, where you can set the font. Try to look in the properties, press F4 in the VB-editor. 2. The code works for me. But you have to adjust it, if your textbox has a different name! Substitute all "TextBox1" with the name of your Textbox I also realized, that there was a wordwrap in the first line! The "private sub" line ends with "ReturnBoolean)" and has to be on one line. Cheers Carlo On Dec 18, 5:45 pm, bartman1980 wrote: On 18 dec, 08:59, carlo wrote: hi bartman1980 1. What do you mean by selectionbox? If you mean Combobox, rightclick on the box -- properties. There you will find your font, click in the field and then on the "..." on the left side. 2. you could check it like that: Private Sub TextBox1_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean) If Not IsDate(Me.TextBox1.Value) And Me.TextBox1.Value < "" Then MsgBox "Please insert a date" Cancel = True End If End Sub hope that helps Carlo On Dec 18, 4:49 pm, bartman1980 wrote: Some simple questions: 1. How can I change the size of the characters in a selectionbox? 2. How can I force somebody to fill in a date in a textbox? I can do it with a cell but I couldn't manage it with a textbox. (If possible without the calander.xla because I tried but I never found out how to do this exactly)- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - Hi Carlo, 1.I ment the check box in the workset forms 2. I tried your code but nothing happend. Did you get it work?- Hide quoted text - - Show quoted text - |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 19 dec, 03:26, carlo wrote:
Hi Bartman 1. the checkbox should also have a property called font, where you can set the font. Try to lookinthe properties, press F4inthe VB-editor. 2. The code works for me. But you have to adjust it, if your textbox has a different name! Substitute all "TextBox1" with the name of your Textbox I also realized, that there was a wordwrapinthe first line! The "private sub" line ends with "ReturnBoolean)" and has to be on one line. Cheers Carlo On Dec 18, 5:45 pm, bartman1980 wrote: On 18 dec, 08:59, carlo wrote: hi bartman1980 1. What do you mean by selectionbox? If you mean Combobox, rightclick on the box -- properties. There you will find your font, clickinthe field and then on the "..." on the left side. 2. you could check it like that: Private Sub TextBox1_BeforeUpdate(ByVal CancelAs MSForms.ReturnBoolean) If Not IsDate(Me.TextBox1.Value) And Me.TextBox1.Value < "" Then MsgBox "Please insert a date" Cancel= True End If End Sub hope that helps Carlo On Dec 18, 4:49 pm, bartman1980 wrote: Some simple questions: 1. How can I change the size of the charactersina selectionbox? 2. How can I force somebody to fillina dateina textbox? I can do it with acell but I couldn't manage it with a textbox. (If possible without the calander.xla because I tried but I never found out how to do this exactly)- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - Hi Carlo, 1.I ment the check boxinthe workset forms 2. I tried your code but nothing happend. Did you get it work?- Hide quoted text - - Show quoted text -- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - Hi Carlo, Now it works fine, thanks! Bart |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Dec 20, 6:43*pm, bartman1980 wrote:
On 19 dec, 03:26, carlo wrote: Hi Bartman 1. the checkbox should also have a property called font, where you can set the font. Try to lookinthe properties, press F4inthe VB-editor. 2. The code works for me. But you have to adjust it, if your textbox has a different name! Substitute all "TextBox1" with the name of your Textbox I also realized, that there was a wordwrapinthe first line! The "private sub" line ends with "ReturnBoolean)" and has to be on one line. Cheers Carlo On Dec 18, 5:45 pm, bartman1980 wrote: On 18 dec, 08:59, carlo wrote: hi bartman1980 1. What do you mean by selectionbox? If you mean Combobox, rightclick on the box -- properties. There you will find your font, clickinthe field and then on the "..." on the left side. 2. you could check it like that: Private Sub TextBox1_BeforeUpdate(ByVal CancelAs MSForms.ReturnBoolean) If Not IsDate(Me.TextBox1.Value) And Me.TextBox1.Value < "" Then * * MsgBox "Please insert a date" * * Cancel= True End If End Sub hope that helps Carlo On Dec 18, 4:49 pm, bartman1980 wrote: Some simple questions: 1. How can I change the size of the charactersina selectionbox? 2. How can I force somebody to fillina dateina textbox? I can do it with acell but I couldn't manage it with a textbox. (If possible without the calander.xla because I tried but I never found out how to do this exactly)- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - Hi Carlo, 1.I ment the check boxinthe workset forms 2. I tried your code but nothing happend. Did you get it work?- Hide quoted text - - Show quoted text -- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - Hi Carlo, Now it works fine, thanks! Bart- Hide quoted text - - Show quoted text - You're welcome Carlo |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing the textbox value without changing the textbox format? | Excel Programming | |||
Textbox: Number of Characters | Excel Programming | |||
Validating number of characters in textbox | Excel Programming | |||
exact number of characters in textbox | Excel Programming | |||
UserForm TextBox to ActiveSheet TextBox over 256 characters | Excel Programming |