Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 148
Default auto open message

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
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 35,218
Default auto open message

You can use a macro:

Option Explicit
Sub Auto_Open()
msgbox thisworkbook.worksheets("Sheet9999").range("u12"). text
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

pcor wrote:

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


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 148
Default auto open message

Thanks for the VERY fast response but......
location u12 is not text but a formula that displays a date
Appreciate all the help
pcor

"Dave Peterson" wrote:

You can use a macro:

Option Explicit
Sub Auto_Open()
msgbox thisworkbook.worksheets("Sheet9999").range("u12"). text
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

pcor wrote:

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


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 118
Default auto open message

Did you try Dave's Macro ??
It does exactly as you asked. It will display a formula result, date, number
etc.

HTH
Michael M




"pcor" wrote:

Thanks for the VERY fast response but......
location u12 is not text but a formula that displays a date
Appreciate all the help
pcor

"Dave Peterson" wrote:

You can use a macro:

Option Explicit
Sub Auto_Open()
msgbox thisworkbook.worksheets("Sheet9999").range("u12"). text
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

pcor wrote:

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


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 35,218
Default auto open message

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.



pcor wrote:

Thanks for the VERY fast response but......
location u12 is not text but a formula that displays a date
Appreciate all the help
pcor

"Dave Peterson" wrote:

You can use a macro:

Option Explicit
Sub Auto_Open()
msgbox thisworkbook.worksheets("Sheet9999").range("u12"). text
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

pcor wrote:

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


--

Dave Peterson


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 148
Default auto open message

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
"Dave Peterson" wrote:

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.



pcor wrote:

Thanks for the VERY fast response but......
location u12 is not text but a formula that displays a date
Appreciate all the help
pcor

"Dave Peterson" wrote:

You can use a macro:

Option Explicit
Sub Auto_Open()
msgbox thisworkbook.worksheets("Sheet9999").range("u12"). text
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

pcor wrote:

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

--

Dave Peterson


--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 35,218
Default auto open message

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.



pcor wrote:

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
"Dave Peterson" wrote:

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.



pcor wrote:

Thanks for the VERY fast response but......
location u12 is not text but a formula that displays a date
Appreciate all the help
pcor

"Dave Peterson" wrote:

You can use a macro:

Option Explicit
Sub Auto_Open()
msgbox thisworkbook.worksheets("Sheet9999").range("u12"). text
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

pcor wrote:

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

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
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
Create a message to 'pop open' JoeP Excel Discussion (Misc queries) 2 April 21st 07 12:02 AM
linked PDF will not open "can not open specified file" is message DaveKC Excel Discussion (Misc queries) 0 February 19th 07 07:38 PM
Auto e-mail message Freshman Excel Worksheet Functions 1 October 31st 06 07:24 PM
want to create a message box to appear on open Fionajpower Excel Discussion (Misc queries) 2 September 26th 05 12:59 PM
message/dialog box auto open when excel file is activated welshwizzard Excel Discussion (Misc queries) 2 January 21st 05 10:05 PM


All times are GMT +1. The time now is 02:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"