![]() |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
auto open message
That did it!!!!! THANKS
pcor "Dave Peterson" wrote: 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 |
auto open message
Glad you got it working.
pcor wrote: That did it!!!!! THANKS pcor "Dave Peterson" wrote: 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 -- Dave Peterson |
All times are GMT +1. The time now is 10:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com