close

Hi:I have a macro written but the enter value does not print. . .any
thoughts?
When the user enter an order number into the message box I want the
following to print:

SyteLine Order No: 67551 or whatever the order number is

The text prints but not the number

Sub GetOrderNo()
Dim strName As String

' GetOrderNo Macro
' Macro recorded 1/23/2006
'
' Keyboard Shortcut: Ctrl g
'
strName = InputBox(Prompt:=quot;Enter SyteLine Order Numberquot;)
ActiveCell.FormulaR1C1 = quot;SyteLine Order No: quot; amp; Format(quot;###0quot;)

End Sub--
dah
------------------------------------------------------------------------
dah's Profile: www.excelforum.com/member.php...foamp;userid=6493
View this thread: www.excelforum.com/showthread...hreadid=504098Format(quot;###0quot;)
should be:

Format(clng(strname),quot;###0quot;)

strName is a string
clng(strname) converts it to a long integer.

And format likes numbers.

dah wrote:
gt;
gt; Hi:
gt;
gt; I have a macro written but the enter value does not print. . .any
gt; thoughts?
gt; When the user enter an order number into the message box I want the
gt; following to print:
gt;
gt; SyteLine Order No: 67551 or whatever the order number is
gt;
gt; The text prints but not the number
gt;
gt; Sub GetOrderNo()
gt; Dim strName As String
gt;
gt; ' GetOrderNo Macro
gt; ' Macro recorded 1/23/2006
gt; '
gt; ' Keyboard Shortcut: Ctrl g
gt; '
gt; strName = InputBox(Prompt:=quot;Enter SyteLine Order Numberquot;)
gt; ActiveCell.FormulaR1C1 = quot;SyteLine Order No: quot; amp; Format(quot;###0quot;)
gt;
gt; End Sub
gt;
gt; --
gt; dah
gt; ------------------------------------------------------------------------
gt; dah's Profile: www.excelforum.com/member.php...foamp;userid=6493
gt; View this thread: www.excelforum.com/showthread...hreadid=504098

--

Dave Peterson

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()