#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,345
Default 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?




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 shasta[_5_] Excel Programming 4 April 13th 04 01:56 PM
MsgBox help Aaron Cooper Excel Programming 3 April 12th 04 08:19 PM
MsgBox Bob Phillips[_6_] Excel Programming 0 April 8th 04 09:11 AM
msgbox Marcus Excel Programming 3 November 19th 03 11:35 PM
MsgBox Phil Perry Excel Programming 1 July 9th 03 07:38 PM


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