Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date input format Roy Gudgeon[_2_] Excel Discussion (Misc queries) 2 May 20th 10 02:05 PM
data input format Roy Gudgeon[_2_] Excel Discussion (Misc queries) 1 March 22nd 10 01:59 PM
Input box format variable to $0.00 Format Mathew Excel Programming 2 September 11th 07 11:18 PM
Input data format from GIS Khoshravan Excel Discussion (Misc queries) 1 May 19th 06 10:05 AM
input box format Dan Excel Programming 3 November 15th 05 06:23 PM


All times are GMT +1. The time now is 07:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"