#1   Report Post  
Posted to microsoft.public.excel.misc
dah
 
Posts: n/a
Default Macro Print Numbers


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


--
dah
------------------------------------------------------------------------
dah's Profile: http://www.excelforum.com/member.php...fo&userid=6493
View this thread: http://www.excelforum.com/showthread...hreadid=504098

  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Macro Print Numbers

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

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

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

And format likes numbers.

dah wrote:

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

--
dah
------------------------------------------------------------------------
dah's Profile: http://www.excelforum.com/member.php...fo&userid=6493
View this thread: http://www.excelforum.com/showthread...hreadid=504098


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to open print window and set to print entire workbook retseort Excel Discussion (Misc queries) 1 October 27th 05 11:00 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Macro to print a selected range, not entire worksheet James C Excel Discussion (Misc queries) 3 October 19th 05 10:12 PM
How do I set a macro to print variable number of pages in excel? Livio Excel Discussion (Misc queries) 1 July 30th 05 12:15 AM
Print Macro NICK Excel Discussion (Misc queries) 1 December 20th 04 03:20 AM


All times are GMT +1. The time now is 06:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"