I am a newbie to VBA, can someone tell me how to insert a dash in between a set of Numbers? Example 12345678 I want to turn into 12345-678
I am a newbie to VBA, can someone tell me how to insert a dash in between a set of Numbers? Example 12345678 I want to turn into 12345-678
You can go to the form, click on the box that you want to alter, go into properties, and then input mask. From there click on the three dots to the side and click on edit list if there is not a already a mask that would work for you. once you click on edit list click new at bottom, and fill in description, on the input mask section type and example of what you are wanting, such as 00000-000 make _ as the placeholder, and then type in 12345-678 under example hit close then try it, if thats what you want then hit next twice, and select with symbols in mask, hit next again then finish. Go back to form and try it out. Hope this helps.
In VBA, you can use the format command to make such a conversion.
format (12345678, "#####-###")
will return 12345-678