PC Review


Reply
Thread Tools Rate Thread

Can I use variables in the text portion of a message box?

 
 
AllInTheChi
Guest
Posts: n/a
 
      12th Aug 2010


Title says it all practically. I have a msgbox pop up at times in my
code to tell me about progress plateaus. What I want to do is
incorporate cell value calls, etc. in the msgbox text. Can I use
"CONCATENATE" or other cell functions within macro code?
 
Reply With Quote
 
 
 
 
AllInTheChi
Guest
Posts: n/a
 
      12th Aug 2010
On Thu, 12 Aug 2010 07:47:46 -0400, Ron Rosenfeld <(E-Mail Removed)> wrote:

>On Thu, 12 Aug 2010 04:07:35 -0700, AllInTheChi
><(E-Mail Removed)> wrote:
>
>>
>>
>> Title says it all practically. I have a msgbox pop up at times in my
>>code to tell me about progress plateaus. What I want to do is
>>incorporate cell value calls, etc. in the msgbox text. Can I use
>>"CONCATENATE" or other cell functions within macro code?

>
>Yes. Just use the concatenation operator ( & ) to produce your
>string.
>
>Something like:
>
>var1 = "Is the Date "
> var2 = #9/1/2010#
> var3 = " OK?"
>
>s = var1 & var2 & var3
>MsgBox (s)


Cool. Thanks. I keep forgetting about making declarations right there
in the code.

Can I use range names and thereby extract cell values on the fly?
 
Reply With Quote
 
Jim Cone
Guest
Posts: n/a
 
      12th Aug 2010
Example... Application.WorksheetFunction.Sum
Use "&" in place of Concatenate... "Smith" & "Wesson" equals "SmithWesson"
See "List of Worksheet Functions" in Excel help.
--
Jim Cone
Portland, Oregon USA
http://www.contextures.com/excel-sort-addin.html

..
..
..

"AllInTheChi" <(E-Mail Removed)>
wrote in message
news(E-Mail Removed)...
Title says it all practically. I have a msgbox pop up at times in my
code to tell me about progress plateaus. What I want to do is
incorporate cell value calls, etc. in the msgbox text. Can I use
"CONCATENATE" or other cell functions within macro code?
 
Reply With Quote
 
AllInTheChi
Guest
Posts: n/a
 
      13th Aug 2010
On Thu, 12 Aug 2010 19:42:47 -0400, Ron Rosenfeld <(E-Mail Removed)> wrote:

>On Thu, 12 Aug 2010 04:52:18 -0700, AllInTheChi
><(E-Mail Removed)> wrote:
>
>>On Thu, 12 Aug 2010 07:47:46 -0400, Ron Rosenfeld <(E-Mail Removed)> wrote:
>>
>>>On Thu, 12 Aug 2010 04:07:35 -0700, AllInTheChi
>>><(E-Mail Removed)> wrote:
>>>
>>>>
>>>>
>>>> Title says it all practically. I have a msgbox pop up at times in my
>>>>code to tell me about progress plateaus. What I want to do is
>>>>incorporate cell value calls, etc. in the msgbox text. Can I use
>>>>"CONCATENATE" or other cell functions within macro code?
>>>
>>>Yes. Just use the concatenation operator ( & ) to produce your
>>>string.
>>>
>>>Something like:
>>>
>>>var1 = "Is the Date "
>>> var2 = #9/1/2010#
>>> var3 = " OK?"
>>>
>>>s = var1 & var2 & var3
>>>MsgBox (s)

>>
>> Cool. Thanks. I keep forgetting about making declarations right there
>>in the code.
>>
>> Can I use range names and thereby extract cell values on the fly?

>
>Yes



Thanks to the both of you...
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Underline a portion of Text via VBA Irshad Alam Microsoft Access Reports 5 25th Feb 2010 08:41 AM
Bolding a portion of a text box =?Utf-8?B?VG9tIEU=?= Microsoft Access 3 22nd Oct 2009 09:56 PM
comparing just the time portion of time date variables Paul Microsoft C# .NET 6 7th Jan 2008 09:24 PM
How can I extract a portion of text from a text string Garry Microsoft Access Queries 3 20th Aug 2007 07:57 PM
How do I cut a portion of text out of a cell? =?Utf-8?B?amVmZg==?= Microsoft Excel Programming 7 7th Mar 2007 03:19 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:51 PM.