#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default MsgBox date

How can I make to open this every day 3 of every month on every day
automatic when I open sheet3

and also how can I make this to open every Monday of every week

Thanks in advance



Sub showContentcell()
'MsgBox "Cell A1 = " & Range("A1").Text
MsgBox "Dia Domingo" _
& Chr(13) & Range("F10").Text _
& Chr(13) & Range("F11").Text _
& Chr(13) & Range("F12").Text _
& Chr(13) & Range("F13").Text _
& Chr(13) & Range("F14").Text _


End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default MsgBox date

Hi Irma,

Try:

'=============
Private Sub Workbook_Open()
Dim msg As String
Const sStr1 = "Es el tercer día del mes"
Const sStr2 = "Dia Domingo"

msg = Chr(13) & Range("F10").Text _
& Chr(13) & Range("F11").Text _
& Chr(13) & Range("F12").Text _
& Chr(13) & Range("F13").Text _
& Chr(13) & Range("F14").Text

If Day(Date) = 3 Then
MsgBox sStr1 & msg
ElseIf Weekday(Date) = vbMonday Then
MsgBox sStr2 & msg
End If
End Sub
'<<=============

This is workbook event code and should be pasted into the workbook's
ThisWorkbook module *not* a standard module or a sheet module:

Right-click the Excel icon on the worksheet
(or the icon to the left of the File menu if your workbook is maximised)
Select 'View Code' from the menu and paste the code.
Alt-F11 to return to Excel.


---
Regards,
Norman


"IRMA MENDOSA" wrote in message
...
How can I make to open this every day 3 of every month on every day
automatic when I open sheet3

and also how can I make this to open every Monday of every week

Thanks in advance



Sub showContentcell()
'MsgBox "Cell A1 = " & Range("A1").Text
MsgBox "Dia Domingo" _
& Chr(13) & Range("F10").Text _
& Chr(13) & Range("F11").Text _
& Chr(13) & Range("F12").Text _
& Chr(13) & Range("F13").Text _
& Chr(13) & Range("F14").Text _


End Sub




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default MsgBox date

Hi Irma,

ElseIf Weekday(Date) = vbMonday Then


should read:

ElseIf Weekday(Date) = vbSunday Then



---
Regards,
Norman


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default MsgBox date


How can I make to open this every day 3 of every month on every day
automatic when I open sheet3

and also how can I make this to open every Monday of every week

Thanks in advance



Sub showContentcell()
'MsgBox "Cell A1 = " & Range("A1").Text
MsgBox "Dia Domingo" _
& Chr(13) & Range("F10").Text _
& Chr(13) & Range("F11").Text _
& Chr(13) & Range("F12").Text _
& Chr(13) & Range("F13").Text _
& Chr(13) & Range("F14").Text _


End Sub


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
msgBox april27 Excel Programming 3 June 16th 06 04:25 PM
MsgBox date & time skippy Excel Programming 7 April 22nd 05 08:19 PM
Msgbox serge Excel Programming 1 January 28th 04 01:48 PM
Msgbox - Puting current date in a message box rglasunow[_4_] Excel Programming 5 January 23rd 04 04:45 PM
MsgBox Help! rbanks Excel Programming 4 November 21st 03 04:17 PM


All times are GMT +1. The time now is 06:47 PM.

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"