Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Automatic Pop-up Message

I need to know how to create a pop-up message when a worksheet is opened. I
need it to say "PUT IN REQ # AND DATE NEEDED NOW". I already have the
following VBA Code to add the current date:

ActiveSheet.Unprotect
Range("T10") = Now()
ActiveSheet.Protect

ActiveSheet.Unprotect Password:="password"
Range("T10") = Now()
ActiveSheet.Protect Password:="password"

What code and where does it go to add the pop-up box?

I would appreciate any help possible.

Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Automatic Pop-up Message

This needs to go on the ThisWorkbook sheet. Also of caution, does the
workbook only have one sheet? If not, you might want to include the line
"Sheets("SheetIwant").select" near the beginning.


Private Sub Workbook_Open()
msgbox "PUT IN REQ # AND DATE NEEDED NOW"
ActiveSheet.Unprotect
Range("T10") = Now()
ActiveSheet.Protect

ActiveSheet.Unprotect Password:="password"
Range("T10") = Now()
ActiveSheet.Protect Password:="password"
End sub


--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"patsy" wrote:

I need to know how to create a pop-up message when a worksheet is opened. I
need it to say "PUT IN REQ # AND DATE NEEDED NOW". I already have the
following VBA Code to add the current date:

ActiveSheet.Unprotect
Range("T10") = Now()
ActiveSheet.Protect

ActiveSheet.Unprotect Password:="password"
Range("T10") = Now()
ActiveSheet.Protect Password:="password"

What code and where does it go to add the pop-up box?

I would appreciate any help possible.

Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Automatic Pop-up Message

You cannot "open" a worksheet.

Do you mean "activate" or "select" a worksheet?

Right-click on the sheet tab and "View Code"

Paste this into that module. Note: no error-checking included.

Private Sub Worksheet_Activate()
reqno = InputBox("Enter a Requisition Number")
ActiveSheet.Unprotect Password:="password"
Range("T10") = Now()
Range("U10") = reqno
ActiveSheet.Protect Password:="password"
End Sub


Gord Dibben MS Excel MVP

On Mon, 12 Jan 2009 11:51:01 -0800, patsy
wrote:

I need to know how to create a pop-up message when a worksheet is opened. I
need it to say "PUT IN REQ # AND DATE NEEDED NOW". I already have the
following VBA Code to add the current date:

ActiveSheet.Unprotect
Range("T10") = Now()
ActiveSheet.Protect

ActiveSheet.Unprotect Password:="password"
Range("T10") = Now()
ActiveSheet.Protect Password:="password"

What code and where does it go to add the pop-up box?

I would appreciate any help possible.

Thanks.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Automatic Pop-up Message

That didn't work. This is a workbook with several tabs. Each sheet in the
workbook is password protected. The guy who opens this workbook has to put a
requisition # and the date that he needs the order on the req. He always
forgets to enter into these fields. I want to make this idiot proof for him
so that when he opens the workbook and goes to the worksheet that needs this
information, the pop-up box will tell him that he needs to put this
information in. When I added the code to that particular worksheet, a box
came up telling me that there were macros. I don't have any macros in the
workbook and don't understand why this box comes up.

Hope I explained this correctly.

Thanks

"Luke M" wrote:

This needs to go on the ThisWorkbook sheet. Also of caution, does the
workbook only have one sheet? If not, you might want to include the line
"Sheets("SheetIwant").select" near the beginning.


Private Sub Workbook_Open()
msgbox "PUT IN REQ # AND DATE NEEDED NOW"
ActiveSheet.Unprotect
Range("T10") = Now()
ActiveSheet.Protect

ActiveSheet.Unprotect Password:="password"
Range("T10") = Now()
ActiveSheet.Protect Password:="password"
End sub


--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"patsy" wrote:

I need to know how to create a pop-up message when a worksheet is opened. I
need it to say "PUT IN REQ # AND DATE NEEDED NOW". I already have the
following VBA Code to add the current date:

ActiveSheet.Unprotect
Range("T10") = Now()
ActiveSheet.Protect

ActiveSheet.Unprotect Password:="password"
Range("T10") = Now()
ActiveSheet.Protect Password:="password"

What code and where does it go to add the pop-up box?

I would appreciate any help possible.

Thanks.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Automatic Pop-up Message

Any VBA code is treated by Excel warning as a "macro".

If you have worksheet code like the SheetActivate code I posted, that will
raise the warning.

If you have an empty genral module, that will raise a warning also even
there is no code.


Gord


On Mon, 12 Jan 2009 13:37:00 -0800, patsy
wrote:

That didn't work. This is a workbook with several tabs. Each sheet in the
workbook is password protected. The guy who opens this workbook has to put a
requisition # and the date that he needs the order on the req. He always
forgets to enter into these fields. I want to make this idiot proof for him
so that when he opens the workbook and goes to the worksheet that needs this
information, the pop-up box will tell him that he needs to put this
information in. When I added the code to that particular worksheet, a box
came up telling me that there were macros. I don't have any macros in the
workbook and don't understand why this box comes up.

Hope I explained this correctly.

Thanks

"Luke M" wrote:

This needs to go on the ThisWorkbook sheet. Also of caution, does the
workbook only have one sheet? If not, you might want to include the line
"Sheets("SheetIwant").select" near the beginning.


Private Sub Workbook_Open()
msgbox "PUT IN REQ # AND DATE NEEDED NOW"
ActiveSheet.Unprotect
Range("T10") = Now()
ActiveSheet.Protect

ActiveSheet.Unprotect Password:="password"
Range("T10") = Now()
ActiveSheet.Protect Password:="password"
End sub


--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"patsy" wrote:

I need to know how to create a pop-up message when a worksheet is opened. I
need it to say "PUT IN REQ # AND DATE NEEDED NOW". I already have the
following VBA Code to add the current date:

ActiveSheet.Unprotect
Range("T10") = Now()
ActiveSheet.Protect

ActiveSheet.Unprotect Password:="password"
Range("T10") = Now()
ActiveSheet.Protect Password:="password"

What code and where does it go to add the pop-up box?

I would appreciate any help possible.

Thanks.



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
Automatic update of spreadsheet & automatic update between workboo Losva Excel Worksheet Functions 6 September 12th 08 03:22 PM
Automatic links message when opening a workbook pgarcia Excel Discussion (Misc queries) 2 March 8th 07 10:53 PM
#N/A Message Daviv Excel Discussion (Misc queries) 2 February 6th 07 07:45 PM
Automatic message kanye Excel Discussion (Misc queries) 1 April 27th 05 04:02 PM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM


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

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

About Us

"It's about Microsoft Excel"