Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 468
Default Msgbox syntax error

In my activesheet I have the value Memphis

In my code I'm try to get the Msgbox to say:

Memphis has not reported in today<<
but the following is turning red in my code window;
can someone assist?

MsgBox "Range("D1").value & " has not reported in today"
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Msgbox syntax error

hi,
one double quote too many. try this
MsgBox Range("D1").value & " has not reported in today"

another way.....
Dim r As Range
Set r = Range("D1")
MsgBox r.Value & " has not reported in today"

regards
FSt1
"JMay" wrote:

In my activesheet I have the value Memphis

In my code I'm try to get the Msgbox to say:

Memphis has not reported in today<<
but the following is turning red in my code window;
can someone assist?

MsgBox "Range("D1").value & " has not reported in today"

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Msgbox syntax error

MsgBox activesheet.Range("D1").value & " has not reported in today"

I'd qualify the range with the sheet and/or the workbook/sheet.

And just in case:

MsgBox activesheet.Range("D1").value _
& " has not reported in today: " _
& format(date,"mmmm dd, yyyy")

JMay wrote:

In my activesheet I have the value Memphis

In my code I'm try to get the Msgbox to say:

Memphis has not reported in today<<
but the following is turning red in my code window;
can someone assist?

MsgBox "Range("D1").value & " has not reported in today"


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 468
Default Msgbox syntax error

Thanks Guys

"Dave Peterson" wrote:

MsgBox activesheet.Range("D1").value & " has not reported in today"

I'd qualify the range with the sheet and/or the workbook/sheet.

And just in case:

MsgBox activesheet.Range("D1").value _
& " has not reported in today: " _
& format(date,"mmmm dd, yyyy")

JMay wrote:

In my activesheet I have the value Memphis

In my code I'm try to get the Msgbox to say:

Memphis has not reported in today<<
but the following is turning red in my code window;
can someone assist?

MsgBox "Range("D1").value & " has not reported in today"


--

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
runtime error: syntax error or access violation oucsester[_2_] Excel Programming 1 May 3rd 06 05:51 PM
runtime error: syntax error or access violation oucsester Excel Programming 0 May 3rd 06 02:22 PM
syntax for code in MsgBox()? Ouka[_4_] Excel Programming 2 July 20th 05 05:18 PM
MsgBox Syntax scott Excel Programming 3 February 7th 05 10:04 PM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM


All times are GMT +1. The time now is 12:03 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"