View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Having difficulty with scroll bar in VB

In your original message you said: "I have a form that started out in VB for applications".
So my instructions applied to opening Excel, opening the Visual Basic Editor (Alt + F11),
opening the Properties window (F4) and proceeding.
Is that what you did?
The scroll bars are a property of the UserForm, they are not "added" - they are "displayed"
when the ScrollBars property (in the Properties window) is set to 3.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Pam"
wrote in message
Jim,
I did the new form, put some boxes on it, put scroll bars on it, set the
h=400 and w=400, set the properties for the scroll bars that I ADDED to
h=800, w=800, BUT is there some way to set the property for the visible
scroll bars?
Needless to say, the way I did it didn't work. At this point, I'm splitting
the form into two parts, and calling one from the other, I guess I can't wrap
my brain around this logic.
Thank you
Pam

"Jim Cone" wrote:


Insert a new form, put some controls on it.
In the Properties window in the VBE...
Set ScrollBars to "3 - fmScrollBarsBoth"
Set ScrollHeight to approximately twice the form height.
Set ScrollWidth to approximately twice the form width.
Show the form and try it.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"Pam"
wrote in message
I have tried everything to get my scroll bars to work in my form. Even to the
point of trying to shrink my information down in my form so I wouldn't have
to use them.
I am new to VB, but I have done some programing, just not an extensive form.
I have a form that started out in VB for applications, so that it could dump
into an excel worksheet when it was filled out.
I have tried the instructions at
http://articles.techrepublic.com.com...1-5355438.html in the VB for
Apps as well as in VB 2008 Express that I downloaded. I get the form, the
code will not work, I don't know if I have to declare something, or even how
to declare something.
I have also tried putting the form with a picture box and putting the scroll
on the picture box. The scroll bar moves, but the picture box does not.
I have worked on this for 12 hours, and I know it has to be something really
simple, but it's killing me.
I'm also not sure if this is the right place to post this, but was told in a
developer forum that this forum might be able to help me with the vba, but
maybe not the 2008 Express.
Any help would be appreciated.
Thank you.