Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple User Form to hold only text
|
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
User Form Help Seems Simple | Excel Programming | |||
Looking to create a simple user form with lookup | Excel Discussion (Misc queries) | |||
User Form Interface .... really a simple question! | Excel Programming | |||
Filling form text boxes from cells. Incredibly simple I know, but I'm new. :-( | Excel Programming | |||
Use a simple Drop Down List or User Form | Excel Programming |