Ian Price
asked on
Word 2010 Table convert 10 to 10.00 via VBA Macro is this possible? 500 pnts
Ok so I have a word table when a user enter 10 I want the to be able to run a macro and have the figure automatically convert to 10 to 10.00 via VBA Macro.
So user enter 10 and the run macro and it converts to 10.00
Easy to get them to just type it but I have my reason for doing this
500pnts - Easy for someone out there I reckon..
Thanks
Ian...
So user enter 10 and the run macro and it converts to 10.00
Easy to get them to just type it but I have my reason for doing this
500pnts - Easy for someone out there I reckon..
Thanks
Ian...
ASKER
Ok fair point...
Bit of background - I am tweaking and invoice for the company I work, we need to use word instead of excel because only word integrate with our internal system.
The table uses a macro to update the calculation field so they need to run a macro any way.
But there is another macro that control is VAT is applied at that point I want VBA to check the contents of a cell and if it 10 or 15 or 20 change it to 10.00, 15.00 or 20.00. So format the cell so to speak it easy in Excel but not in word.
I know I can reference a cell in a table by using the active table command and the column and row etc
Does that help?
Bit of background - I am tweaking and invoice for the company I work, we need to use word instead of excel because only word integrate with our internal system.
The table uses a macro to update the calculation field so they need to run a macro any way.
But there is another macro that control is VAT is applied at that point I want VBA to check the contents of a cell and if it 10 or 15 or 20 change it to 10.00, 15.00 or 20.00. So format the cell so to speak it easy in Excel but not in word.
I know I can reference a cell in a table by using the active table command and the column and row etc
Does that help?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
For example, if the user has the discipline to run the macro, they why not just enter 10.00 instead of 10. Or is it the case that you have a document full of 10's that you wish to replace with 10.00's
Will the 10 be the only thing in the cell?
A basic approach is shown in the attached, you will need to rename .zip to .docm
Open in new window
10.zip