LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Inserting values in MsgBox

I want the value of PONum to be inserted in the message box. I tried
writing it after reading past posts on the subject, but I get an error.
Syntax error?

'Here's the code leading up the Msgbox:

Dim PONum As String
For i = 1 To 13
'This will check to make sure there is only 1 PO number on list.
Worksheets("Official List").Activate
If Me.Controls("TextBox" & i * 2 - 1).Text < "" Then
PONum = Me.Controls("TextBox" & i * 2 - 1).Text
CountPOtoValidate = Application.CountIf(Range("J:J"), PONum)

If CountPOtoValidate < 1 Then
MsgBox ("This record " & Range("PONum") & "does not exist on the
list." & vbNewLine & _
"Please check the PO number you entered, and try
again.")

I'm assuming I have to put quotes around PONum, right?

Anything stand out to anyone???



Thanks for your help,
J.O.

 
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
msgBox sum values Claudio Silva Excel Discussion (Misc queries) 1 January 18th 07 12:38 PM
Custom MsgBox using values from 2 different cells Todd Huttenstine[_3_] Excel Programming 3 November 27th 03 12:49 AM
format values in MsgBox? NorTor Excel Programming 2 September 9th 03 02:26 PM
Inserting values Tom Ogilvy Excel Programming 0 September 7th 03 01:32 AM
Inserting values Chip Pearson Excel Programming 0 September 7th 03 01:20 AM


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

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

About Us

"It's about Microsoft Excel"