|
-
Jun 13th, 2005, 10:25 PM
#1
Thread Starter
Member
Moving scrollbar up and down on form [RESOLVED]
Hi,
I have placed a vertical scrollbar on my userform but when i run the form - the scrollbar appears but i am unable to move the scrollbar up and down to view the form? I thought this would be done easily...but...not really
Last edited by chaos7; Jun 15th, 2005 at 10:08 PM.
Reason: no longer needed an answer
-
Jun 14th, 2005, 12:03 AM
#2
Re: Moving scrollbar up and down on form
scroll bars are not easy in vb, (i have never used one in vba)
in vb you have to write all the code to set the scale the scrollbar will move the form by, both clicking on the up and down arrows and clicking in bar for page moves.
try a google search on scrollbar vba, it will give a lot of hits
pete
-
Jun 14th, 2005, 12:35 AM
#3
Thread Starter
Member
Re: Moving scrollbar up and down on form
oh damn!! and i thought that it was something relatively easy.
-
Jun 14th, 2005, 12:41 AM
#4
Re: Moving scrollbar up and down on form
i believe it would probably be harder than saving settings
pete
-
Jun 14th, 2005, 12:56 AM
#5
Thread Starter
Member
Re: Moving scrollbar up and down on form
Oh God!! Didn't think it was that bad - already having problems with the temp save. I'm giving myself till tomorrow if i cant get temp saving and scrollbar working im jus going to leave it as is. Hate programming!!
-
Jun 14th, 2005, 01:06 AM
#6
Re: Moving scrollbar up and down on form
post your whole project (document or spreadsheet) and i will try to have a look at it to help you out a bit (not do the whole thing for you though)
pete
-
Jun 14th, 2005, 01:25 AM
#7
Thread Starter
Member
Re: Moving scrollbar up and down on form
no thats okay i am nearly done...just need to figure out how to work the scrollbar and save the temperature and light sensor settings...if i dont get it done i'll just hand in what i have.
-
Jun 14th, 2005, 07:30 AM
#8
Frenzied Member
Re: Moving scrollbar up and down on form
Chaos:
Here's a way to force the View of an Excel Window to a particular cell:
Code:
'Select the Top Left cell before leaving and scroll the window
'This is the VERBOSE form of the command:
Application.GoTo Reference:=Range("A88"), Scroll:=True
'This is the TERSE form of the exact same command:
Application.GoTo Range("A88"), True
Of course the Ranged cell can be specified in the programmable syntax: Range(Cells(irow, icol))
Good Luck and Good Learning!
Last edited by Webtest; Jun 14th, 2005 at 07:32 AM.
Reason: Excel
Blessings in abundance,
All the Best,
& ENJOY!
Art . . . . Carlisle, PA . . USA
-
Jun 14th, 2005, 07:47 PM
#9
Thread Starter
Member
Re: Moving scrollbar up and down on form
Ahh..thanks Webtest but in using Word never used Excel. I think i may have found a work around though - didnt realise what a pain scrollbars were
-
Jun 15th, 2005, 11:34 AM
#10
Frenzied Member
Re: Moving scrollbar up and down on form
On a whim, I looked up "GoTo" in the Word VBA Help Heap ... here are a few examples from that information that move the insert cursor:
Code:
'Jumps to the 4th line of the document (Absolute)
Selection.GoTo What:=wdGoToLine, Which:=wdGoToAbsolute, Count:=4
'Jumps ahead 20 lines in the document (Relative)
Selection.GoTo What:=wdGoToLine, Which:=wdGoToRelative, Count:=20
'Jumps back 6 lines in the document (Previous)
Selection.GoTo What:=wdGoToLine, Which:=wdGoToPrevious, Count:=6
Good Luck and Good Learning.
Blessings in abundance,
All the Best,
& ENJOY!
Art . . . . Carlisle, PA . . USA
-
Jun 15th, 2005, 10:09 PM
#11
Thread Starter
Member
Re: Moving scrollbar up and down on form [RESOLVED]
Thanks Webtest for ur help but i've eliminated the use of scrollbar from my program.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|