Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default msg box to display specials

hey guys

we got a number of specials runing at once but they dont all start or end on
the same day. now i need a msg box to pop up when the workbook are opened
and tell the user what specials are currently running and when it started and
when its going to end.

so i guess i need a msg box to pop up with a label and below that three in
put boxes and a okay button. in the three boxes we can type a short
description of the specials and next to it when it start and next to that
when it ends.

on the page it self (called "inputpage") i need the discription in column c
down and column d will be the start date and column e the end date. and if
possible if the system can see when it ends and the day after it end delete
the entry. if the system cant see and delete a "expired" special i can work
with a delete button. so u pick/choose the one thats expired and hit delete.

i did not use userforms to much yet but are starting so if a userform will
do the trick thats cool to

thanx

happy 2008 to all

Phillip
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default msg box to display specials

You can try something like the following. Change the worksheet and range
reference to the first cell that has the specials text. The code will check
all dates in D and E until a blank cell is found in C.

Sub Auto_Open()
Dim S As String
Dim R As Range
'<<< CHANGE SHEET AND RANGE AS REQUIRED
Set R = ThisWorkbook.Worksheets("Sheet1").Range("C1")

Do Until R.Value = vbNullString ' loop until empty cell in C
If R(1, 2).Value <= Now Then ' Start Date
If R(1, 3).Value = Now Then ' End Date
S = S & R.Text & vbCrLf
End If
End If
Set R = R(2, 1) ' move down in C
Loop

If S < vbNullString Then
MsgBox S, vbOKOnly, "Specials"
End If
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"pswanie" wrote in message
...
hey guys

we got a number of specials runing at once but they dont all start or end
on
the same day. now i need a msg box to pop up when the workbook are opened
and tell the user what specials are currently running and when it started
and
when its going to end.

so i guess i need a msg box to pop up with a label and below that three in
put boxes and a okay button. in the three boxes we can type a short
description of the specials and next to it when it start and next to that
when it ends.

on the page it self (called "inputpage") i need the discription in column
c
down and column d will be the start date and column e the end date. and if
possible if the system can see when it ends and the day after it end
delete
the entry. if the system cant see and delete a "expired" special i can
work
with a delete button. so u pick/choose the one thats expired and hit
delete.

i did not use userforms to much yet but are starting so if a userform will
do the trick thats cool to

thanx

happy 2008 to all

Phillip


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default msg box to display specials

thanx chip that will work but...

on that i need 3 input boxes to add the name, start date, end date

and how do i program the in put boxes to put it in the next open line
respectively in colums c and d and e.

and if possible to delete expired specials.

"Chip Pearson" wrote:

You can try something like the following. Change the worksheet and range
reference to the first cell that has the specials text. The code will check
all dates in D and E until a blank cell is found in C.

Sub Auto_Open()
Dim S As String
Dim R As Range
'<<< CHANGE SHEET AND RANGE AS REQUIRED
Set R = ThisWorkbook.Worksheets("Sheet1").Range("C1")

Do Until R.Value = vbNullString ' loop until empty cell in C
If R(1, 2).Value <= Now Then ' Start Date
If R(1, 3).Value = Now Then ' End Date
S = S & R.Text & vbCrLf
End If
End If
Set R = R(2, 1) ' move down in C
Loop

If S < vbNullString Then
MsgBox S, vbOKOnly, "Specials"
End If
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"pswanie" wrote in message
...
hey guys

we got a number of specials runing at once but they dont all start or end
on
the same day. now i need a msg box to pop up when the workbook are opened
and tell the user what specials are currently running and when it started
and
when its going to end.

so i guess i need a msg box to pop up with a label and below that three in
put boxes and a okay button. in the three boxes we can type a short
description of the specials and next to it when it start and next to that
when it ends.

on the page it self (called "inputpage") i need the discription in column
c
down and column d will be the start date and column e the end date. and if
possible if the system can see when it ends and the day after it end
delete
the entry. if the system cant see and delete a "expired" special i can
work
with a delete button. so u pick/choose the one thats expired and hit
delete.

i did not use userforms to much yet but are starting so if a userform will
do the trick thats cool to

thanx

happy 2008 to all

Phillip


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
Cells display as R5C5. How do I change it to display E5? FinanceTrainer Excel Discussion (Misc queries) 2 December 14th 09 08:27 PM
some cells display formulas, some display values mvivelo Excel Discussion (Misc queries) 1 March 27th 08 10:09 PM
How to display remaining txt file which overflowed MsgBox display? EagleOne Excel Discussion (Misc queries) 1 November 2nd 06 01:10 PM
Display every 3rd category name but still display latest month maryj Charts and Charting in Excel 1 September 24th 06 09:05 PM
Why does my formula bar display a lengthy string, but my cells display #####? [email protected] Excel Programming 2 August 23rd 06 06:43 PM


All times are GMT +1. The time now is 03:08 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"