Macro Print Numbers

D

dah

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:="Enter SyteLine Order Number")
ActiveCell.FormulaR1C1 = "SyteLine Order No: " & Format("###0")

End Sub
 
D

Dave Peterson

Format("###0")
should be:

Format(clng(strname),"###0")

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

And format likes numbers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Macro to print multiple purchase orders 1
Macro will not work - Please help 4
Macro Help 2
Macro command 3
writing a sort macro 2
How to hide password? 1
Macro Help 4
Macro in excel/ced 3

Top