auto open message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Here is what I would like: Open the Excel file and the first thing I would
see is a message box that tells me what is located in cell u12
Thanks
pcor
 
Thanks for the VERY fast response but......
location u12 is not text but a formula that displays a date
Appreciate all the help
pcor
 
Did you try Dave's Macro ??
It does exactly as you asked. It will display a formula result, date, number
etc.

HTH
Michael M
 
Just to add to Michael M's response...

..text tells excel to show what appears in the cell.

..value will return the value of the cell. So if your cell contains a date that
contains a special format (maybe a long date: mmmm dd, yyyy), you may really
want .text instead of .value.
 
Obviously I am doing something wrong.
Let me t3ell you what I am doing and you can tell me where I have gone wrong
Here is the macro as I copies it from the sheet
Sub Auto_Open()
MsgBox ThisWorkbook.Worksheets("Sheet1").Range("m6").text
End Sub
This code is located by right clicking on SHEET1/view code.
the file name is "pills.xlsm
Please help and thanks
pcor
 
That's not the right location.

This code goes in a General module.

With your workbook's project selected
Insert|Module

Move the code there.


Obviously I am doing something wrong.
Let me t3ell you what I am doing and you can tell me where I have gone wrong
Here is the macro as I copies it from the sheet
Sub Auto_Open()
MsgBox ThisWorkbook.Worksheets("Sheet1").Range("m6").text
End Sub
This code is located by right clicking on SHEET1/view code.
the file name is "pills.xlsm
Please help and thanks
pcor
 
That did it!!!!! THANKS
pcor

Dave Peterson said:
That's not the right location.

This code goes in a General module.

With your workbook's project selected
Insert|Module

Move the code there.
 
Back
Top