Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Macro for a Pop-Up Box help....

One way:

Put this in your ThisWorkbook code module:

Private Sub Workbook_Open()
Const nTAB As Long = 15 'num chars to align on
Dim nOffset As Long
Dim i As Long
Dim sMsg As String
Dim sPad As String
sPad = Space(nTAB)
With Worksheets("Sheet3")
If Date = .Range("B2").Value And Date <= .Range("AZ2").Value Then
nOffset = Date - .Range("B2").Value + 2
For i = 4 To 7
sMsg = sMsg & vbNewLine & Left$(.Cells(i, 1) & sPad, _
Len(sPad)) & .Cells(i, nOffset)
Next i
MsgBox Mid(sMsg, 2)
End If
End With
End Sub


In article ,
neilcarden wrote:

Hi. I hope someone can help me.....

I have a spreadsheet which is used for a daily schedule of contact
centre advisor staff. I want to create a macro that will throw up a pop
up box when the sheet is opened using the date as a reference....

So on e worksheet named 'realtime' i have row 2 from cells B to AZ
containing a date ie B2= 01/07/2007, C2= 02/07/2007 etc.

Column A has various 'headings' A4= Earlies, A5= Mids, A6= Lates, A7=
Total

So under each date is the corresponding figures for the stuff in column
A.

So if I open the sheet today (03/07/2007) I would want a pop up that
shows this data....

Earlies the data in D4
Mids the data in D5
Lates the data in D6
Total the data in D7

But obviously it needs to reference today's date and show the figures
under that date?

Hope this makes sense.

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
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 1 February 5th 07 09:31 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM


All times are GMT +1. The time now is 11:04 PM.

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"