ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Incorrect msgPrompt (https://www.excelbanter.com/excel-programming/305772-re-incorrect-msgprompt.html)

Norman Jones

Incorrect msgPrompt
 
Hi Rodney,

Try:

Sub Test()
Dim msgPrompt As String, msgTitle As String
Dim msgButtons As Integer
Dim myResult As Integer
msgPrompt = "Error check complete" & Chr(13) _
& "Errors detected " & Range("CNT")
msgButtons = vbOKOnly
msgTitle = "LEDGER COLUMN ERROR CHECK"

MsgBox msgPrompt, msgButtons, msgTitle

End Sub


---
Regards,
Nnorman


"Cheif" wrote in message
...
I have a cell range named CNT. CNT contains the number of machine

detected errors after checking 75 ledger columns. Let's sat there are five.
Therefore, CNT would equal 5. I would like my msgPrompt to read:

Error check complete
Errors detected 5

I can not write line two of the msgPrompt correctly to include a formula

that includes the CNT value. Please help me with this line. Below is my
msgBox macro.

Dim msgPrompt As String, msgTitle As String, msgButtons As Integer
Dim myResult As Integer
msgPrompt = "Error check complete" & Chr(13) & "="Errors detected "&(CNT)"
msgButtons = vbOKOnly
msgTitle = " LEDGER COLUMN ERROR CHECK"
msgResult = MsgBox(msgPrompt, msgButtons, msgTitle)
--
Rodney Getschman
Wisconsin VFW




Cheif

Incorrect msgPrompt
 
Thanks Normon. Just what I wanted. The well known question: "Why didn't I think of that?"
--
Rodney Getschman


"Norman Jones" wrote:

Hi Rodney,

Try:

Sub Test()
Dim msgPrompt As String, msgTitle As String
Dim msgButtons As Integer
Dim myResult As Integer
msgPrompt = "Error check complete" & Chr(13) _
& "Errors detected " & Range("CNT")
msgButtons = vbOKOnly
msgTitle = "LEDGER COLUMN ERROR CHECK"

MsgBox msgPrompt, msgButtons, msgTitle

End Sub


---
Regards,
Nnorman


"Cheif" wrote in message
...
I have a cell range named CNT. CNT contains the number of machine

detected errors after checking 75 ledger columns. Let's sat there are five.
Therefore, CNT would equal 5. I would like my msgPrompt to read:

Error check complete
Errors detected 5

I can not write line two of the msgPrompt correctly to include a formula

that includes the CNT value. Please help me with this line. Below is my
msgBox macro.

Dim msgPrompt As String, msgTitle As String, msgButtons As Integer
Dim myResult As Integer
msgPrompt = "Error check complete" & Chr(13) & "="Errors detected "&(CNT)"
msgButtons = vbOKOnly
msgTitle = " LEDGER COLUMN ERROR CHECK"
msgResult = MsgBox(msgPrompt, msgButtons, msgTitle)
--
Rodney Getschman
Wisconsin VFW






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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com