Collect User Input

J

JCO

Can VB programing within Excel, take the user's Input.

Can a macro run and get the Font Name and Font Size? If so, how is this
done?
Thanks
 
H

Howard

Can VB programing within Excel, take the user's Input.



Can a macro run and get the Font Name and Font Size? If so, how is this

done?

Thanks
Hi JCO,

Try this.

Option Explicit

Sub FontIt()
Dim i As Variant, j As Variant
i = Range("A1").Font.Size
j = Range("A1").Font.Name
MsgBox i & " " & j
End Sub

Regards,
Howard
 
G

GS

JCO wrote on 02/03/2013 :
Can VB programing within Excel, take the user's Input.

Can a macro run and get the Font Name and Font Size? If so, how is
this done?
Thanks

Why do you need to prompt the user for this? Is their some reason why
the user can't just select these from the toolbar control?

Otherwise, you'd need to use the VB6 Common Dialog control, which would
have to be distributed with your VBA project. A VB6 developer license
is required to use/distribute the control in your projects.

Perhaps you can google to see if someone has written a pure VB font
picker that you can modify to work in a VBA userform. Or maybe there's
a DLL available!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top