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
VB ScriptMicrosoft Word

Avatar of undefined
Last Comment
Keith McElroy

8/22/2022 - Mon
GrahamSkan

Have you tried

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

Open in new window

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.
Keith McElroy

ASKER
May be if I can inject a tab?  But how?
http://www.screencast.com/t/0Awum4A0TW
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Subodh Tiwari (Neeraj)

Have you tried something like this?
tbl.cell(2, 9).Range.Text = FormatCurrency(myval)

Open in new window

Keith McElroy

ASKER
FormatCurrency would work if I could make the $ flush left and the number flush right.
SOLUTION
Subodh Tiwari (Neeraj)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
GrahamSkan

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Keith McElroy

ASKER
You both rock.  I was stuck on this and your help really made a difference!
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.