Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
You can either force it to a text: '--------------------------------------------------------------------- Sub test() Dim s As String s = Application.InputBox("Enter file number", "File", , , , , , 2) MsgBox s ' add code for case s="False" ie user clicked Cancel End Sub '----------------------------------------------------------------------- or, if numbers are 3-digit long for sure, format explicitely the output (v in thsi exmaple): v=strings.format(v,"000") ' force to 3-digit -- Regards, Sébastien <http://www.ondemandanalysis.com "hshayh0rn" wrote: I have an input box that my users put a number in. The number is then used throught my macro to identify a file. Eveything works fine until the user enters a number like 089 or 054. If there is a preceeding zero in the number the zero is dropped off and the macro then trys to use 89 or 54 as the inputed nunber. How can I keep the zero? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to input pictures automatically based on cell input? | Excel Worksheet Functions | |||
input in number form is being multiplied by 1000 when i input. | Excel Discussion (Misc queries) | |||
How do I add input data in the input ranges in drop down boxes. | Excel Discussion (Misc queries) | |||
=SUMIF(Input!H2:H718,AZ19,Input!E2:E685)AND(IF | Excel Worksheet Functions | |||
CODE to select range based on User Input or Value of Input Field | Excel Programming |