Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Entering variables on Msgbox prompt


Hi,

I am trying to enter a variable on the prompt of a message box. Could
someone help me on this?

Thanks,

Variable: Range("Year")
Prompt: Msgbox "Yada yada yada (variable should go here) yada yada
yada"


--
renegan
------------------------------------------------------------------------
renegan's Profile: http://www.excelforum.com/member.php...o&userid=10450
View this thread: http://www.excelforum.com/showthread...hreadid=498001

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Entering variables on Msgbox prompt

Hi renegan
Dim a as variant
a = Range(???).value
Msgbox "Yada yada yada " & a & " yada yada"

Regards
Yngve

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default Entering variables on Msgbox prompt

Assuming the result is a string you could use something like:

Dim sYear As String

sYear = Range("Year").Value
Msgbox "Yada yada yada " & sYear & " yada yada yada"

Best regards

John


"renegan" wrote in
message ...

Hi,

I am trying to enter a variable on the prompt of a message box. Could
someone help me on this?

Thanks,

Variable: Range("Year")
Prompt: Msgbox "Yada yada yada (variable should go here) yada yada
yada"


--
renegan
------------------------------------------------------------------------
renegan's Profile:
http://www.excelforum.com/member.php...o&userid=10450
View this thread: http://www.excelforum.com/showthread...hreadid=498001



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Entering variables on Msgbox prompt


Thank you both John and evgny. It worked fine.


--
renegan
------------------------------------------------------------------------
renegan's Profile: http://www.excelforum.com/member.php...o&userid=10450
View this thread: http://www.excelforum.com/showthread...hreadid=498001

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
VB - ignore a msgbox prompt Kevin Excel Discussion (Misc queries) 3 January 10th 08 11:47 AM
How do I format a MSGBOX to show text and variables in a macro? Pank New Users to Excel 4 March 22nd 07 01:10 PM
Line breaks in MsgBox concatenated variables Sandy Excel Programming 6 August 28th 05 03:22 AM
Msgbox prompt and tabbing Neal Zimm Excel Programming 2 May 26th 05 01:52 PM
msgbox prompt when user selects data from combo box Tom Ogilvy Excel Programming 5 July 11th 03 09:24 PM


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