Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display Current File Name in MsgBox
It must be simple but I can't find how to display the
current filename in a message box, preceded by a piece of text. eg. MsgBox Cleared workbook has been saved as current filename. The file has already been saved so the current filename is available. MsgBox Application.ActiveWorkbook.name gives the current filename but I cannot find how to precede the name with a meaningful message. Many Thanks Paul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display Current File Name in MsgBox
never replied to a post before, so i hope i get this right: -
to include preceeding text, use concatenation, ie, MsgBox "Some Text " & Application.ActiveWorkbook.name "Paul Moles" wrote in message ... It must be simple but I can't find how to display the current filename in a message box, preceded by a piece of text. eg. MsgBox Cleared workbook has been saved as current filename. The file has already been saved so the current filename is available. MsgBox Application.ActiveWorkbook.name gives the current filename but I cannot find how to precede the name with a meaningful message. Many Thanks Paul |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display Current File Name in MsgBox
dim title as string
dim msg as string title = "File Loaded" msg = "The following workbook is saved" & vbcr & vbcr msg = msg & ActiveWorkbook.name msgbox msg,,title Patrick Molloy Microsoft Excel MVP -----Original Message----- It must be simple but I can't find how to display the current filename in a message box, preceded by a piece of text. eg. MsgBox Cleared workbook has been saved as current filename. The file has already been saved so the current filename is available. MsgBox Application.ActiveWorkbook.name gives the current filename but I cannot find how to precede the name with a meaningful message. Many Thanks Paul . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display Current File Name in MsgBox
Thanks Tim,
-----Original Message----- never replied to a post before, so i hope i get this right: - to include preceeding text, use concatenation, ie, MsgBox "Some Text " & Application.ActiveWorkbook.name "Paul Moles" wrote in message ... It must be simple but I can't find how to display the current filename in a message box, preceded by a piece of text. eg. MsgBox Cleared workbook has been saved as current filename. The file has already been saved so the current filename is available. MsgBox Application.ActiveWorkbook.name gives the current filename but I cannot find how to precede the name with a meaningful message. Many Thanks Paul . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display Current File Name in MsgBox
sCurrentFileName = Application.ActiveWorkbook.name
sMeaningFullText="The Current Filename is "&sCurrentFileName Msgbox sMeaningFullText Lars Kofod -----Original Message----- It must be simple but I can't find how to display the current filename in a message box, preceded by a piece of text. eg. MsgBox Cleared workbook has been saved as current filename. The file has already been saved so the current filename is available. MsgBox Application.ActiveWorkbook.name gives the current filename but I cannot find how to precede the name with a meaningful message. Many Thanks Paul . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Display MsgBox when selecting a sheet | Excel Discussion (Misc queries) | |||
How to display remaining txt file which overflowed MsgBox display? | Excel Discussion (Misc queries) | |||
display cell value in msgbox formatted as % | Excel Discussion (Misc queries) | |||
DISPLAY RANGE AT MSGBOX | Excel Programming | |||
Specify font for MsgBox display? | Excel Programming |