Pop-up message at start-up?

T

Themis

Hello... here's hoping I can get more help, like the wonderful help I've
received from you people in the past... I have searched high and low but came
up with no solution!

What I need to do is have a message box open automatically when my excel
file is loaded. Ideally, it wouldn't be a msgbox, but rather a nice normal
box flexible enough so I can change the contents (simple text, most probably)
easily. Is it possible to launch the contents of a txt or an html file?

Thanks in advance!
Themis
 
B

Bob Phillips

Create a userform that does all you want, and launch like so

Private Sub Workbook_Open()
Userform1.Show
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code


--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)
 
D

Daoud Fakhry

Thanks Bob,
Sorry to interupt your talking. If I creat a from and put a password in it,
how I can do that?

Thanks,
Daoud Fakhry
 
T

Themis

Thanks oh-so-much for the prompt reply!

It works! It's not as flexible, since I have to go into the code to update
the text, but it'll have to do :)

Thanks again,
Themis
 
B

Bob Phillips

Use a textbox, and set the PasswordChar property to *, this will stop the
text being echoed back when you type it. You will also need to store the
password somewhere, in code, a hidden sheet, or maybe a hidden name.

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)
 
V

vcff

Hi Bob

Can you tell me how to create a userform?
I tried to name one of the worksheet as UserForm1 and type some wordings in
cell A1, save and reopen with a run-time error '424' Object required.

Thanks
vcff
 
B

Bob Phillips

No, a userform is a completely different beast to a worksheet.

Take a look at these articles.

http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.


Peter Aiken Articles:
Part I
http://msdn.microsoft.com/library/en-us/dnoffpro01/html/IntroductiontoUserFormsPartI.asp

Part II
http://msdn.microsoft.com/library/en-us/dnoffsol02/html/IntroductiontoUserFormsPartII.asp

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)
 
Top