I've done lots of looking on the forum, and the helpfiles, but just cant seem to format my text box properly! Its a form where the user inputs to the text box. I want to control thatway where they enter numbers e.g 05052008 and it gets converted to 05/05/2008 or 05-05-2008. I've tried a range of things, but am really stumped!
I'm using nested SUBSTITUTE formula to make some changes to the some of the data. I'm also using IFERROR to return the input if it does not find the criteria I have specified. I have lot of variations in my input data.
The formula works fine for all except for date format input.
N90232Y09--->SUBSTITUTE(A1,"N","")-->90232Y09 12335--->12335 12/3/1923---->58936 (I want the date to be retained)
why the date format is changed even if don't specify any changes for it. I expect my IFERROR to just retain the input as it is.
I am entering values in columns AV and BD of the attached spreadsheet. Rather than manually editing each value to adopt the decimal place value of the adjacent cell is there a formula that can achieve this before the value is entered? The decimal place values are determined using a VLOOKUP table (column3) on the NES tab.
I have a SS of a WW1 casualty list and one of the columns is Dates of Birth but the data has been entered in three different formats eg 21/2/1898 or 21.2.1898 or 21 Feb 1898. I have tried to Format Cells and change the date format to the slash but after highlighting a number of fields and right clicking they will not re format. Though i use Excel quite a bit i am a general user and dont understand it in depth.
I have a userform that contains textbox's that are linked to excel cells and i was wondering if there is a way to format the textbox to show the values in the number format. As the cells values are constantly changing the following code only works if the number is in the hundred of billions but if the number changed to 10,000 for example the format would not adapt.
Private Sub TextBox1_Change() Me.TextBox5 = Format$(CStr(ThisWorkbook.Sheets("ISN").Range("H1").Value) * Val(TextBox1.Text), "###,###,###,###") End Sub
In my Excel VBA user form, there are multiple instances of the MS DTPicker control, which feed multiple text boxes. These in turn are linked to named cells on an worksheet. Note at this stage please that dates will not always be required, hence the text boxes. Only the button on the DTP controls are visible, alongside the related textbox.
My problem is that the values in the cells are in US date format and I need them to be recognised in the UK date format. The dates therein must be formatted as dates (ie not as text), as they are used throughout other worksheets for calculations. In the sample below, DTPickerDateOfIncorporation is the named cell (the control source). I know from Roy's responses to other questions on the DTPicker that he doesn't use it - is there a better alternative?
I have a calendar userform that enters a date into a userform textbox in the format mm/dd/yy.
I am in the UK, so default date format is dd/mm/yyyy but i need it as above - mm/dd/yy
So, when I get a MsgBox to repeat Textbox1.Value (the date from the calendar object, formatted mm/dd/yy) and repeat it in format dddd mmmm dd yyyy, it reads the value not as I want it, mm/dd/yy, but as the usual dd/mm/yyyy - so instead of reading 08/01/12 as Wednesday August 01 2012 it is giving me Sunday January 08 2012 - even though in the cells on the worksheet that are populated from the textbox, the date reads correctly, so 08/01/2012 is indeed 1st August 2012 not January 8th 2012...
So it's the MsgBOx function reading the textbox in the userform wrong, and formatting makes no difference...
Can I fix this without changing my regional settings? Is there a way to set the region in vba then unset when leaving the program? I don't want to have to change regional, and anyway, the program will be used by others who won't know / want to do that.
I have uploaded a copy of the spreadsheet I am working on and have completed the user forms and coding for march the 1st only, so if you test, please use the options march and then the 1st!
The problems i have is, when I enter a number into a text box and press next page, the numbers fill where i want them to but the cells do not recognise them as numbers, therefore conditional formatting doesnt work! Even if I change the cell properties to numbers, this does not remove the error!
Second problem!! If a user forgetts to enter a value in a box, or they wish to edit just one value, and go back into the user form to change a figure, when they press next page, all the values in the column seem to disappear!
I have a userfrom with 2 textboxes used for entering dates. would like to either force the user to enter the date as xx/xx/xxxx or have a calendar feature where they can select a date. I checked my 'additional controls' in my toolbox but do not see a calendar option.
One of my userform text boxes is for the input of a date. this date is being exported to a defined cell in excel, but in a US format, mm/dd/yyyy. i need this to be exported into excel in UK/Aussie format dd/mm/yyyy as our accounting software is getting confused (i am also).
Private Sub TextBox3_Change() Range("C7").Value = TextBox3.Value End Sub
One of the reports I run provides me information on lengths of time. Such a field displays as |0:09:16| indicating 9 minutes and 16 seconds. However, when the report generates the excel spreadsheet it saves these cells in date/time format ([h]:mm:ss). If I were to convert this field to the number format (so I can manipulate and graph it) it displays as such |0.00643460648148148| Ideally I would be able to have the data in the field stored as |556| (556 seconds, or 9 minutes 16 seconds). I have thousands of fields that I need to manipulate where the data is stored in this format and I can not figure out how to fix it.
I have an Excel 2010 spreadsheet where the default number format keeps switching to the date format. I keep switching it back and it'll stay as a number format for a time, but then it'll switch back. This is also the case for any new worksheets in that one spreadsheet.
This only happens with this one file - everything else behaves according to my regional settings or to how the file had been previously formatted.
I having problem to determine the format value of dates that needs to be inserted in a Userform.
I have the following format in my userform for my Textbox:
When I select the calendar in my userform that is set as follows:
And select the first day of the month, it will always add the format as 05/01/2014 but if I select today’s date as example it will add it in the right format: 2014/05/26
I have included a sample to demonstrate the function of the calendar as I have declared it public as d in a module, therefore making the population of my userforms textbox easier to add information on dates.
If you add 2014/05/01 - 2014/05/26 and 2014/05/06 you will see where the system is having problem with the month and dates I guess the system confuses the two?
When the Go button in text box in the 'VSVA-1 Data' tab is pressed, a new tab is created. I would like the tab to be renamed after the text that is entered into the text box. Is this possible? Here is what I have so far.
VB: Sub RenameTab() 'Renames the worksheet tab ActiveWorkbook.Sheets("VSVA-1 Data").Select tabName = TextBox1 ActiveWorkbook.Sheets("VSVA Data").Select Selection.Name = tabName End Sub
I have textbox within a userform and want it to function as the place where the user could enter a password. I just want that during the entering the entered signs would automatically be turned into stars (disguised as stars), but of course the entered password would remain its real value.
I have a userform for entering a sales invoice onto a spreadsheet, it obviously has a textbox each for the net value(textboxnet), gst tax(textboxgst) and total value(textboxtotal). How do I get the total amount textbox (textboxtotal) to automatically sum up as I enter the net (textboxnet) and gst (textboxgst) amounts?
In Excel is there are way to format a cell automatically dependent on the value in another cell? Specifically, if the user selects "410" from a list in cell O9 and enters numeric characters into cell K6 the format of cell K6 is a whole number. However, if the user selects any other number from the list in cell O9 and enters numeric characters into cell K6 the format of cell K6 is now in dollars. I tried using custom in Excel, which I really would like have it in, with no sucess. I am now thinking the only way to accomplish this task is by VBA code. I am ok with formulas; VBA is a different story.
I have a textbox on a userform in which I want the users to enter a valid time, such as "1:20" or "0:15". How can I test this input to verify it is a valid time? Also, after this time is entered, how do I subtract it from the current time which I am displaying in another box>