Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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
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
Display MsgBox when selecting a sheet Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 3 October 11th 07 03:42 PM
How to display remaining txt file which overflowed MsgBox display? EagleOne Excel Discussion (Misc queries) 1 November 2nd 06 01:10 PM
display cell value in msgbox formatted as % rgarber50 Excel Discussion (Misc queries) 5 July 10th 05 03:27 PM
DISPLAY RANGE AT MSGBOX GUS Excel Programming 2 September 25th 03 08:38 PM
Specify font for MsgBox display? shockley Excel Programming 1 September 11th 03 01:50 PM


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