Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combined text and variable in a message box
I'm trying to display message box that combines text along with a
variable that was previously defined. The following code only displays the date that's contained in the variable Dt, but it doesn't display the text. How can this be done? Dt = "Records prior to " & Dt & " have been removed" MsgBox Dt Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combined text and variable in a message box
This works just fine for me.
Dt = 5 Dt = "Records prior to " & Dt & " have been removed" MsgBox Dt Not sure why it's not working for you. You could always use something like: Dt = 5 MsgBox "Records prior to " & Dt & " have been removed" or Dt = 5 msgString = "Records prior to " & Dt & " have been removed" MsgBox msgString wrote: I'm trying to display message box that combines text along with a variable that was previously defined. The following code only displays the date that's contained in the variable Dt, but it doesn't display the text. How can this be done? Dt = "Records prior to " & Dt & " have been removed" MsgBox Dt Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combined text and variable in a message box
Hi
your code seems ok though it looks like you are changing the data held in Dt to the string of text rather than your date variable?? MsgBox "Records prior to " & Dt & " have been removed" seems to work fine for me. S |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combined text and variable in a message box
MsgBox "Records prior to " & Dt & " have been removed" -- Regards, Tom Ogilvy " wrote: I'm trying to display message box that combines text along with a variable that was previously defined. The following code only displays the date that's contained in the variable Dt, but it doesn't display the text. How can this be done? Dt = "Records prior to " & Dt & " have been removed" MsgBox Dt Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
error message "Some chart types cannot be combined with other char | Charts and Charting in Excel | |||
text combined with values | Excel Discussion (Misc queries) | |||
Text in a combined spreadsheet | Excel Discussion (Misc queries) | |||
Figures and text combined | Excel Worksheet Functions | |||
text and values combined in one cel | Excel Discussion (Misc queries) |