Link to home
Start Free TrialLog in
Avatar of Keith McElroy
Keith McElroy

asked on

vb script microsoft word table cell: inject flush left dollar sign

How can I change this code so that ther is a flush left $ sign in the table cell as in the screenshot:

dim myval
myval = 19298888
tbl.cell(2,9).range.text= FormatNumber(myval)

Screenshot: http://www.screencast.com/t/te3vRJMd0
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Have you tried

tbl.cell(2,9).range.text= "$" & FormatNumber(myval)

Open in new window

Avatar of Keith McElroy
Keith McElroy

ASKER

No, I will try it.
Will it make the $ flush left and the FormatNumber(myval) flush right?
I think I need something in between that will do that.
May be if I can inject a tab?  But how?
http://www.screencast.com/t/0Awum4A0TW
Have you tried something like this?
tbl.cell(2, 9).Range.Text = FormatCurrency(myval)

Open in new window

FormatCurrency would work if I could make the $ flush left and the number flush right.
SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You both rock.  I was stuck on this and your help really made a difference!