Filename in Input/Message Box

C

Chadersmith

Hello Everyone,

I have done some searching to no avail about how to put the activeworksheet
filename into the text of an input/message box.

Does anyone have an idea that could work?

Thanks
 
D

Dave Peterson

msgbox Prompt:="hi " & activesheet.name

or maybe:

msgbox Prompt:="hi there", title:=activesheet.name
 
C

Chip Pearson

Dim S As String

For the worksheet name:
S = ActiveSheet.Name
For the workboook name:
S = ThisWorkbook.Name
For the workbook file name:
S = ThisWorkbook.FullName
MsgBox S


Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top