Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
MsgBox help
Can someone help with a problem I am having? I have a button that I want to
click on that will tell the user what months of data are loaded. The months are listed in individual cells on a hidden data page. My end goal is to have the user click the button and then a message box appear that says, "The following months of data have been loaded: Jan, Feb....etc") Any ideas on how to do this? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
MsgBox help
Private Sub CommandButton1_Click() MsgBox Range("A1").Value & " Has Been Loaded", vbInformation, "TiTLE" End Sub "James C." wrote: Can someone help with a problem I am having? I have a button that I want to click on that will tell the user what months of data are loaded. The months are listed in individual cells on a hidden data page. My end goal is to have the user click the button and then a message box appear that says, "The following months of data have been loaded: Jan, Feb....etc") Any ideas on how to do this? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
MsgBox help
Something like:
Sub CommandButton1_Click() Dim EndData As Long Dim x As Long Dim Msg As String With Sheets("Sheet2") EndData = .Cells(Rows.Count, 1).End(xlUp).Row For x = 1 To EndData Msg = Msg & .Cells(x, 1).Value & ", " Next x Msg = Left(Msg, Len(Msg) - 2) MsgBox _ "The following Months of data have been loaded:" _ & vbLf & vbLf & Msg End With End Sub -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "James C." wrote in message ... Can someone help with a problem I am having? I have a button that I want to click on that will tell the user what months of data are loaded. The months are listed in individual cells on a hidden data page. My end goal is to have the user click the button and then a message box appear that says, "The following months of data have been loaded: Jan, Feb....etc") Any ideas on how to do this? |