Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format input box
With the help of lovely forum peeps i have a piece of code which includes
Response = InputBox("Formulation Number", vbOKCancel) Is it possible to format the inputbox, as its a little big and looks silly. I have never used a user form so dont really have a clue where to start there |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format input box
An Inputbox isn't a UserForm its one of Excels built in boxes and as such we
cannot format it, if you were to create a userform to look like an InputBox then you could size that as needed. Regards, The Code Cage Team www.thecodecage.com/forumz "Miree" wrote: With the help of lovely forum peeps i have a piece of code which includes Response = InputBox("Formulation Number", vbOKCancel) Is it possible to format the inputbox, as its a little big and looks silly. I have never used a user form so dont really have a clue where to start there |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format input box
If i do create a user form then how do i get it to use it instead of text box?
"The Code Cage Team" wrote: An Inputbox isn't a UserForm its one of Excels built in boxes and as such we cannot format it, if you were to create a userform to look like an InputBox then you could size that as needed. Regards, The Code Cage Team www.thecodecage.com/forumz "Miree" wrote: With the help of lovely forum peeps i have a piece of code which includes Response = InputBox("Formulation Number", vbOKCancel) Is it possible to format the inputbox, as its a little big and looks silly. I have never used a user form so dont really have a clue where to start there |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format input box
Create a userform with a textbox and a commanbutton on it, then in the sub
that you have the Inputbox remove that and use the line: Userform1.Show, this will show the userform, double click the command button on the userform in design mode (when you can see the userform you are creating in the VBE) the module for the button will pop up and read Private Sub Commanbutton1_Click(), add this code, Activesheet.Range("A1").Value = Me.Textbox1.Value Unload Me those 2 lines of code do gthis: 1st) puts the value of the textbox on the form in A1 of the sheet that is currently visible, 2nd) unloads the userform, it's ok to unload it as we aren't using it again until the next call otherwise we could use the line Userform1.Hide. Hope this helps. Regards, The Code Cage Team www.thecodecage.com/forumz "Miree" wrote: If i do create a user form then how do i get it to use it instead of text box? "The Code Cage Team" wrote: An Inputbox isn't a UserForm its one of Excels built in boxes and as such we cannot format it, if you were to create a userform to look like an InputBox then you could size that as needed. Regards, The Code Cage Team www.thecodecage.com/forumz "Miree" wrote: With the help of lovely forum peeps i have a piece of code which includes Response = InputBox("Formulation Number", vbOKCancel) Is it possible to format the inputbox, as its a little big and looks silly. I have never used a user form so dont really have a clue where to start there |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format input box
Have a look at this site - It shows you how to create a userform, add
controls like textboxes etc & even has a short video. http://www.contextures.com/xlUserForm01.html -- jb "Miree" wrote: If i do create a user form then how do i get it to use it instead of text box? "The Code Cage Team" wrote: An Inputbox isn't a UserForm its one of Excels built in boxes and as such we cannot format it, if you were to create a userform to look like an InputBox then you could size that as needed. Regards, The Code Cage Team www.thecodecage.com/forumz "Miree" wrote: With the help of lovely forum peeps i have a piece of code which includes Response = InputBox("Formulation Number", vbOKCancel) Is it possible to format the inputbox, as its a little big and looks silly. I have never used a user form so dont really have a clue where to start there |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date input format | Excel Discussion (Misc queries) | |||
data input format | Excel Discussion (Misc queries) | |||
Input box format variable to $0.00 Format | Excel Programming | |||
Input data format from GIS | Excel Discussion (Misc queries) | |||
input box format | Excel Programming |