Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am running a VB script and want to have an amount entered in an input box
for display in a textbox. The value is only being displayed after all the code is executed and not after the Ok button of the input box is selected as I would wish to happen. These controls are on a worksheet. What can I do? David |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Mar 22, 8:54 pm, "willing2learn" <u32721@uwe wrote:
I am running a VB script and want to have an amount entered in an input box for display in a textbox. The value is only being displayed after all the code is executed and not after the Ok button of the input box is selected as I would wish to happen. These controls are on a worksheet. What can I do? David David, If you are looking for the InputBox value to appear in the text box right after the InputBox "OK" button is pressed, then place the line of code in your program that takes the InputBox variable (and subsequently writes that variable to the text box) right after the InputBox line of code. From your problem description, that's the best answer I can give you. If you need something more specific, post some code or write a problem description that is more detailed. Matt |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
matt wrote:
I am running a VB script and want to have an amount entered in an input box for display in a textbox. The value is only being displayed after all the code is executed and not after the Ok button of the input box is selected as I would wish to happen. These controls are on a worksheet. What can I do? David David, If you are looking for the InputBox value to appear in the text box right after the InputBox "OK" button is pressed, then place the line of code in your program that takes the InputBox variable (and subsequently writes that variable to the text box) right after the InputBox line of code. From your problem description, that's the best answer I can give you. If you need something more specific, post some code or write a problem description that is more detailed. Matt Hi Matt That's just what I am doing but I am really at a loss as to why my textbox is not displaying the vale. Here is some of the code. Dim Value1, Value2 Value1 = Application.InputBox(prompt:="Enter Deductions Amount", Type:=1) If Value1 = False Then End Else Worksheets("Cover").TextBox3.Value = Value1 End If Value2 = Application.InputBox(prompt:="Enter Net Cheques Amount", Type:=1) If Value2 = False Then End Else Worksheets("Cover").TextBox4.Value = Value2 End If -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200703/1 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Mar 23, 3:43 am, "willing2learn via OfficeKB.com" <u32721@uwe
wrote: matt wrote: I am running a VB script and want to have an amount entered in an input box for display in a textbox. The value is only being displayed after all the code is executed and not after the Ok button of the input box is selected as I would wish to happen. These controls are on a worksheet. What can I do? David David, If you are looking for the InputBox value to appear in the text box right after the InputBox "OK" button is pressed, then place the line of code in your program that takes the InputBox variable (and subsequently writes that variable to the text box) right after the InputBox line of code. From your problem description, that's the best answer I can give you. If you need something more specific, post some code or write a problem description that is more detailed. Matt Hi Matt That's just what I am doing but I am really at a loss as to why my textbox is not displaying the vale. Here is some of the code. Dim Value1, Value2 Value1 = Application.InputBox(prompt:="Enter Deductions Amount", Type:=1) If Value1 = False Then End Else Worksheets("Cover").TextBox3.Value = Value1 End If Value2 = Application.InputBox(prompt:="Enter Net Cheques Amount", Type:=1) If Value2 = False Then End Else Worksheets("Cover").TextBox4.Value = Value2 End If -- Message posted via OfficeKB.comhttp://www.officekb.com/Uwe/Forums.aspx/excel-programming/200703/1- Hide quoted text - - Show quoted text - Try this: Worksheets("Cover").Shapes("Text Box 1").Select Selection.Characters.Text = Value1 It should do the job. Matt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Highlight all Text in a Textbox when the textbox is selected | Excel Programming | |||
HELP! I Lost The Ability To Advance From TextBox To TextBox With the ENTER Or The TAB Keys | Excel Programming | |||
Textbox Bug? Missing/delayed update of textbox filled via VBA | Excel Programming | |||
Textbox Bug? Missing/delayed update of textbox filled via VBA | Excel Programming | |||
How to move cursor from one textbox control to another textbox con | Excel Programming |