Solved

Page Up key

Posted on 2011-02-16
20
233 Views
Last Modified: 2012-05-11
The normal commande I use for VBA Excel interacting with Extra is "<ENTER"> for example. How do I recplicate the Page Up key? Nothing seems to work
0
Comment
Question by:macrohappy
  • 9
  • 5
  • 4
  • +1
20 Comments
 

Expert Comment

by:bruzie
ID: 34912830
Use:
ActiveWindow.LargeScroll Down:=-1

Open in new window


(ActiveWindow.LargeScroll Down:=1 gives you PageDown)
0
 

Author Comment

by:macrohappy
ID: 34912848
Isn't there a simple SendKeys command. I am not looking to scroll I want to utilize the Page Up Key by using a SendKey command
0
 

Author Comment

by:macrohappy
ID: 34912865
I should clarify that I am interacting with Excel VBA and Attachmate Extra 9.1
0
 

Expert Comment

by:bruzie
ID: 34912885
In which case this should do the trick:
Application.SendKeys("{PGUP}")

Open in new window

From: http://msdn.microsoft.com/en-us/library/aa202943(v=office.10).aspx
0
 

Author Comment

by:macrohappy
ID: 34912927
Doesn't work the only format I can get to work for Attachmate is Application.SendKeys "<Enter>".
Application.SendKeys "<PGUP>" or Application.SendKeys "<Pageup>" doesn't work
0
 

Author Comment

by:macrohappy
ID: 34912951
I got it the format for the pageup key is  Application.SendKeys "<Pa1>>". Thnaks for trying
0
 
LVL 41

Expert Comment

by:dlmille
ID: 34913250
It wasn't a try.  It works, my friend.

Here - see it in code:

Put this in your workbook - page down a bunch, then run this macro from Developer's ribbon.

Sub test()
    Application.SendKeys "{PGUP}"
End Sub


And when you get a link from a bonafide source like http://msdn.microsoft.com, you might want to try to understand perhaps what could have gone wrong when you test.


Cheers,

dave
0
 
LVL 41

Expert Comment

by:dlmille
ID: 34913252
Remember to use CURLY braces :) if that could make a diff.

:)

Dave
0
 
LVL 45

Expert Comment

by:patrickab
ID: 34915228
>The normal commande I use for VBA Excel interacting with Extra...

What is Extra?
0
 
LVL 45

Expert Comment

by:patrickab
ID: 34915247
macrohappy should not be awarding himself the answer if he has been helped.

If a co-worker has helped then that person should be awarded the appropriate grade and points.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:macrohappy
ID: 34915919
I would gladly award him the points but he is not a meme of this site. Not sure what the big deal is I just so happen to get help elsewhere, so harm no foul. These point things don't mean anything to me
0
 
LVL 45

Expert Comment

by:patrickab
ID: 34916081
>These point things don't mean anything to me

In other words you couldn't care less about those that help you - even though they are not paid to do so and the only way in which you can show your appreciation on this website is by awarding points and a grade.

Because you pay for membership does not exempt you from knowing how this website works nor from recognising help when you get it.
0
 

Author Comment

by:macrohappy
ID: 34916112
If you notice I have submitted 18 previous questions and have awarded 500 points everytime. You tell me who should I reward the points to even though the solution didn't help? Points for trying is that what you are after?
0
 
LVL 45

Expert Comment

by:patrickab
ID: 34916237
>Points for trying is that what you are after?

No, I have never suggested nor expected that. It's just that your original reason for closing the question did not make sense. But each to their own.

Meanwhile I don't even see the point of your question - but then that's just me.
0
 

Author Comment

by:macrohappy
ID: 34916374
I am not trying to be a jerk and I hold a lot of respect for people like yourself that understand VBA as well as you do, that is why I have a membership. For some reason the standard code for SendKeys does not work for me I have to use an alernative format. If you can tell me why I would be more than happy to accept your solution and award the points.

I have to use "<Enter>" instend of "{Enter}" and now I had to use "<Pa1>" instead of "{PGUP}". I have no idea why the standard format does not work. The macro runs a Terminal Emulator called Attachmate Extra. Maybe there is some settings in the TE, I don't know.
0
 
LVL 45

Expert Comment

by:patrickab
ID: 34917329
macrohappy,

First run this:

Sub redirect()
Application.OnKey "{PGUP}", "Attachmate Extra"
End Sub

Subsequently PgUp will start Attachmate Extra if that's what you call to start Attachmate Extra".

Patrick
0
 
LVL 41

Accepted Solution

by:
dlmille earned 500 total points
ID: 34917885
I did some research and apparently Attachmate Extra has special keys that it uses, and those special keys can be found in the Extra Basic help files.

Here's a link:  http://www.tek-tips.com/faqs.cfm?pid=99&fid=4087

Dave
0
 
LVL 41

Expert Comment

by:dlmille
ID: 34917893
These can be used with the SendKeys command in VBA against an Attachmate Extra application, per the FAQ

Dave
0
 

Author Comment

by:macrohappy
ID: 34918070
I received a helpful answer
0
 

Author Closing Comment

by:macrohappy
ID: 34918093
Exactly what I have been searching for. Thanks for the link. In addition to the < > issue I also found that my keyboard had my Page Up key mapped as a PA1 key
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now