Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Simple User Form to hold only text

Hi There,

Im trying to find some VB that creates a simple user form with say 10
lines of text underneath each other (Text line 1, text line 2, etc) and
a close button.

Anyone know how.... ?

(PS - User will run a macro that brings up the form - but as the form is
so simple, perhaps there is a less cubersome way to create "pop up" type
info in Excel (not comments or the like!)

Regards

Darin



*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Simple User Form to hold only text

Sub ShowMessage()
s = "Line 1" & vbNewLine
s = s & "Line 2" & vbNewLine
s = s & "Line 3" & vbNewline
s = s & "Line 4" & vbNewline
s = s & "Line 5" & vbnewlIne
s = s & "Line 6" & vbNewline
s = s & "Line 7" & vbNewline
s = s & "Line 8" & vbNewline
s = s & "Line 9" & vbNewline
s = s & "Line 10"
msgbox s
End Sub

Msgbox will only show 255 lines of text, but perhaps that is sufficient.

--
Regards,
Tom Ogilvy



"Darin Kramer" wrote:

Hi There,

Im trying to find some VB that creates a simple user form with say 10
lines of text underneath each other (Text line 1, text line 2, etc) and
a close button.

Anyone know how.... ?

(PS - User will run a macro that brings up the form - but as the form is
so simple, perhaps there is a less cubersome way to create "pop up" type
info in Excel (not comments or the like!)

Regards

Darin



*** Sent via Developersdex http://www.developersdex.com ***

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Simple User Form to hold only text

Awesome Tom!!! Thanks!
Is there any way to change the name of the box to my own defined name
instead of "Microsoft Excel"

Kind Regards

Darin



*** Sent via Developersdex http://www.developersdex.com ***
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Simple User Form to hold only text

Msgbox has several arguments. You might look at the help for a fuller
understanding of its capabilities. Put the code in a module, highight Msgbox
and hit F1. I have added code to change the title.

Sub ShowMessage()
s = "Line 1" & vbNewLine
s = s & "Line 2" & vbNewLine
s = s & "Line 3" & vbNewLine
s = s & "Line 4" & vbNewLine
s = s & "Line 5" & vbNewLine
s = s & "Line 6" & vbNewLine
s = s & "Line 7" & vbNewLine
s = s & "Line 8" & vbNewLine
s = s & "Line 9" & vbNewLine
s = s & "Line 10"
MsgBox Prompt:=s, Buttons:=vbOKOnly, Title:="Darin's advice"
End Sub

--
regards,
Tom Ogilvy


"Darin Kramer" wrote:

Awesome Tom!!! Thanks!
Is there any way to change the name of the box to my own defined name
instead of "Microsoft Excel"

Kind Regards

Darin



*** Sent via Developersdex http://www.developersdex.com ***

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Simple User Form to hold only text

Darin,

You can change the title of the MsgBox by including the "Title" parameter.
E.g.,

MsgBox "Message Text", vbOKOnly, Title:="MsgBox Title"


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


"Darin Kramer" wrote in message
...
Awesome Tom!!! Thanks!
Is there any way to change the name of the box to my own defined name
instead of "Microsoft Excel"

Kind Regards

Darin



*** Sent via Developersdex http://www.developersdex.com ***





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Simple User Form to hold only text



Thanks so much all!!!

*** Sent via Developersdex http://www.developersdex.com ***
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 947
Default Simple User Form to hold only text

Just another similar variation:

Sub Demo()
Dim m As Variant
m = Array( _
"Line 1", _
"Line 2", _
"Line 3", _
"Line 4", _
"Line 5")

MsgBox Join(m, vbNewLine), vbOKOnly, "My Title"
End Sub

--
HTH :)
Dana DeLouis
Windows XP & Office 2007


"Darin Kramer" wrote in message
...


Thanks so much all!!!

*** Sent via Developersdex http://www.developersdex.com ***



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
User Form Help Seems Simple Brandon Johnson Excel Programming 5 June 6th 06 03:34 PM
Looking to create a simple user form with lookup Tim Excel Discussion (Misc queries) 5 November 14th 05 04:57 PM
User Form Interface .... really a simple question! monir Excel Programming 8 April 24th 05 08:14 PM
Filling form text boxes from cells. Incredibly simple I know, but I'm new. :-( Paul Crabb Excel Programming 0 November 18th 04 01:49 AM
Use a simple Drop Down List or User Form Ted Excel Programming 0 October 11th 04 09:37 PM


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