PDA

View Full Version : Word userform control for a horizontal line



Giuliar
06-16-2008, 08:56 PM
Back in my WordPerfect days, I created userforms in templates and when I didn't want to use a frame to divide sections, I put horizontal and vertical lines in my userforms. I don't see a control for inserting lines in Word. Is there an easy way in insert a horizontal line in a user form. If not, I'll just use a frame.:dunno

CreganTur
06-17-2008, 05:19 AM
Unless there's something I'm not aware of, then you will need to use a frame. Just make sure that you set the caption to have an empty string value- that will ensure that the frame lines are unbroken so it'll look nicer.

lucas
06-17-2008, 08:08 AM
You can also use a lable and add this to the userform initialize statement:
Private Sub UserForm_Initialize()
With Label1
.Caption = ""
.Height = 2
.SpecialEffect = fmSpecialEffectSunken
End With
End Sub

fumei
06-17-2008, 09:24 AM
Definitely you can use a Label to do this, as Steve showed. However, I do not understand why he has it as part of Initialize.

Why are you doing it programmatically? Just set those values of the Label when you put the Label on the userform. Done.

NOTE: you can have either a horizontal "line", or a vertical "line" by setting the Height and Width properties of the Label.

Height: 2 Width: 200 = horizontal line

Height: 200 Width: 2 = vertical line

lucas
06-17-2008, 09:36 AM
You are right Gerry, it does not need to be done programatically.......but it can be done that way too if needed...

fumei
06-17-2008, 10:08 AM
True, very true. Although:

"Is there an easy way in insert a horizontal line in a user form"

My bolding. No mention of programatically doing anything. Your code does not insert anything. It changes an existing Label.

Please, I hope you realize I am not being critical - good heavens, I would not even think of it with you!

I am trying to think of a situation that one would want to change Label dimensions at run-time, and especially on Initialize.

If it is in Initialize...then you would NEVER see the previous dimensions anyway...so why not just set the dimensions in the first place?

Sorry, never mind, I am just being overly fussy. I will go away now.

lucas
06-17-2008, 10:14 AM
Point taken Gerry. I do sometimes skip through without reading in a detailed way and often give solutions not directly requested......keep me on target, I count on it. No offense ever taken by your input.:friends:

fumei
06-17-2008, 10:17 AM
Thank you, you're a peach...or something like that.

What the heck does that mean, anyway?

Peach?

Someone said that to me recently. "You're a peach." It was meant, I think, as a compliment.

Huh?

lucas
06-17-2008, 10:21 AM
I'm takin it as a compliment........

CreganTur
06-17-2008, 11:06 AM
What the heck does that mean, anyway?

Peach?


peach(n): 1)round, fuzzy fruit
2) Informal. a person or thing that is especially attractive, liked, or enjoyed.

Looks to me like she was calling you round and fuzzy:rotlaugh:

NinjaEdit: I am not calling gerry a "she" in this... I'm assuming that whoever called Him a peach was female (as only southern females use that term around here)

But... you know what they say about ass_u_me_ing :goofball:

MOS MASTER
06-17-2008, 01:06 PM
Looks to me like she was calling you round and fuzzy:rotlaugh:

Thank god nothing has changed over here!!! :rofl:

fumei
06-17-2008, 02:24 PM
youse guys

lucas
06-18-2008, 08:16 AM
Well, heck.....I'm in my late fifties now and pretty fuzzy and round so I guess it's accurate in a cheech and chong kind of a way.......

fumei
06-18-2008, 09:32 AM
Cheech and Chong certainly gives your age away.

lucas
06-18-2008, 10:19 AM
Might as well roll with it Gerry. I remember listening to the dorsie brothers when I was young and watching heckle and jeckle. Now I play songs with the kids by artists like Wheezer and Candlebox, Pink Floyde and some of my favorites still.....Eagles, Beatles, Queen etc.......times change....so must we.

Old folks like me detest places like Los Angeles and yet I am headed that way next week......a son I haven't seen for a year(since his wedding last year) is the only draw and yet the newlyweds have plans for us to go to the Isle of Catalina and go snorkleing.....can't wait. I do love to eat fresh seafood when on the coast.

fumei
06-18-2008, 01:47 PM
I hate L.A., but love northern California. I have been going there almost every year for almost 25 years. I have very dear friends who used to live in San Francisco, but have retired and moved to Healdsburg (about 70 miles north of S.F.).

There are 114 wineries within 20 miles of their house. Fortunately, I do not have (and never have) an issue with alcohol - I dislike feeling drunk at all...but I DO like the taste of fabulous wine. Especially with seafood. There is a wonderful place on the coast (near Fort Bragg) to die for. And, being a civilized place, you can buy a bottle of wine, have some (for me, that means one glass) with dinner, and then have it corked to take away....for a picnic on the beach perhaps, the next day.

Although, I have to say, the ultimate seafood dinner I have ever had was getting literally fresh tuna off the boat on Kauai. Kissed on a barbeque....heaven.