Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Forms 2.0 ScrollBar value property 2

Status
Not open for further replies.

torturedmind

Programmer
Jan 31, 2002
1,052
PH
i just dropped an activex control (MS Forms 2.0 ScrollBar) on a form using the form control toolbar (activex). problem is, it doesn't have any value property whatsoever. as a result, when i run my form, the following error message appears
OLE IDispatch exception code 0 from Forms.ScrollBar.1: Could
not set the Value property. Invalid property value...
based on ms site, it should have a value property but there is none. why is this so? any ideas are very much appreciated.

peace! [peace]

kilroy [knight]
philippines

"Once a king, always a king. But being a knight is more than enough."
 

Kilroy,

I'm not familiar with that particular control. But, in general, some Activex controls require you to access certain properties via the Object property. So, the syntax would be:

? THISFORM.Scrollbar.Object.Value

It might be worth trying the above to see if it works.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
thanks sir mike for the suggestion. it gave me the value of the scrollbar. still, the error mentioned above did not go away. i know am missing something i just don't know what (as am not really good in using activex objects). any more suggestions are much appreciated.

peace! [peace]

kilroy [knight]
philippines

"Once a king, always a king. But being a knight is more than enough."
 
Just a suggestion if you are continuing to have problems (why you would still get the error if you are referencing the object of the olecontrol is beyond me... something like thisform.olecontrol1.object.value = 10 should not be throwing an error)...

The forms 2.0 controls are old... use a newer scrollbar control. Look in your list of activex controls for "Microsoft Flat Scrollbar 6.0(SP4)" and try that out instead. Works fine in the VFP applications where I have used it.

boyd.gif

 
thanks sir craig. in fact, i did try the flat scrollbar last night and as far as i can tell, it is much easier to "play with" compared to the scrollbar i used earlier. nonetheless, i'd still love to learn more about the forms 2.0 controls for learning's sake. i think i'll be frequenting ms's site again for reference.

thanks y'all for all the help and ideas. peace! [peace]

kilroy [knight]
philippines

"Once a king, always a king. But being a knight is more than enough."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top