×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Preventing scrolling

Preventing scrolling

Preventing scrolling

(OP)
I'm writing an Excel app to find the area of a polygon pasted into a picture box.  I move the cursor over a point and press the spacebar which sends the coordinates to a couple of cells.  This works great until I get too many points and XL starts scrolling!  As the coordinates are screen relative, its not good to have the picture scrolling around.  Can I somehow prevent scrolling until I'm finished capturing all my points?

"We have a leadership style that is too directive and doesn't listen sufficiently well. The top of the organisation doesn't listen sufficiently to what the bottom is saying."  Tony Hayward CEO BP
"Being GREEN isn't easy." Kermitfrog http://www.youtube.com/watch?v=hpiIWMWWVco

http://virtualpipeline.spaces.liv

RE: Preventing scrolling

Have you tried using the Freeze Panes function?

RE: Preventing scrolling

Freezing may do what you want if the area of interest is in the frozen portion of screen.

Another possibility:
Sub LIMITSCROLL()
Dim mysheet As Worksheet
Set mysheet = Sheets("Sheet1")
mysheet.ScrollArea = "A1:R32"
End Sub

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

RE: Preventing scrolling

Open the VBA editor and modify the ScrollArea for the sheet.

View Clyde's profile on LinkedIn

RE: Preventing scrolling

BigInch - you can download a spreadsheet that does what you are looking for from here:

http://newtonexcelbach.wordpress.com/2010/04/14/how-to-digitise-a-scanned-image/

Rather than using mouse clicks you draw a polygon over the shape, and the program uses the coordinates of the polygon vertices, which gets around the scrolling problem.

The code is all open source, so it may give you some ideas, even if it isn't suitable for your application as is.

Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/
 

RE: Preventing scrolling

(OP)
ePete, I realized that if I didn't print the values in any cells and just calculated the area as a part of the VBA program itself, scrolling didn't happen, so the problem kinda' went away there, but thanks.  I'm sure I'll run into the scrolling problem again somewhere.

Clyde, where is that feature.  I can't find it.

Doug, I'll try your digitizing program.  Sounds like that will do exactly what I want.  Wish I knew about that yesterday, but then I wouldn't have gotten all that good DIY education. :-\

Super.  Thanks all.

"We have a leadership style that is too directive and doesn't listen sufficiently well. The top of the organisation doesn't listen sufficiently to what the bottom is saying."  Tony Hayward CEO BP
"Being GREEN isn't easy." Kermitfrog http://www.youtube.com/watch?v=hpiIWMWWVco

http://virtualpipeline.spaces.liv

RE: Preventing scrolling

(OP)
Ah ha.  Properties page.  Never noticed scroll area was there.

"We have a leadership style that is too directive and doesn't listen sufficiently well. The top of the organisation doesn't listen sufficiently to what the bottom is saying."  Tony Hayward CEO BP
"Being GREEN isn't easy." Kermitfrog http://www.youtube.com/watch?v=hpiIWMWWVco

http://virtualpipeline.spaces.liv

RE: Preventing scrolling

Probably

application.screenupdating = false

would do the trick.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources