GetKeyBoardState Function

Greetings,
I am working on a function to see if Ctrl + S is pressed. Useing the 
GetKeyboardState Function is it possible to retirve this information? Also 
What I have written crashes excel any ideas what i'm missing?


  Dim anArray
  Dim Result As Long
  
  On Error GoTo HandleError
  
  anArray = Array(VK_CONTROL, VK_S)
  
  Result = GetKeyboardState(anArray(0))
0
Utf
2/18/2010 4:24:04 PM
excel.programming 6508 articles. 2 followers. Follow

1 Replies
1297 Views

Similar Articles

[PageSpeed] 19

Chip Pearson has a page on this, but using GetKeyState API function:
http://www.cpearson.com/excel/KeyTest.aspx

Cheers,
Dave

"Jeff" wrote:

> Greetings,
> I am working on a function to see if Ctrl + S is pressed. Useing the 
> GetKeyboardState Function is it possible to retirve this information? Also 
> What I have written crashes excel any ideas what i'm missing?
> 
> 
>   Dim anArray
>   Dim Result As Long
>   
>   On Error GoTo HandleError
>   
>   anArray = Array(VK_CONTROL, VK_S)
>   
>   Result = GetKeyboardState(anArray(0))
0
Utf
2/18/2010 4:37:01 PM
Reply:

Similar Artilces:

Sum Function Without Including Hidden Rows?
I'm using Excel 2000 and have *hidden* several rows that include numeric data. I want to do a sum function on some of the columns intersecting those rows, but when I insert an AutoSum function, it includes data in the visible rows AND the hidden rows. Is there an easy way to perform a sum function that *only* includes the rows that are *-visible?-* (Which rows are hidden/visible are subject to constant change) Thanks for your help! --- Message posted from http://www.ExcelForum.com/ You would need a UDF for that or if there is a pattern (like if every other column/row is hidden) th...

How to use more than 7 IF functions in a formula?
I tried to post a question earlier but it never appeared on the messag list. Not sure if it went through. So here it is again. I am trying to set up a formula where when I type in a weight i another column it will automatically puts in an assigned value for tha weight. The problem is that the weights range from 110 through 260. have found that I cannot put in more than 7 IF functions in a formula. This is my first time trying to do something like this and I am havin problems. I know there has to be a way to do this. For example I tried this formula and it worked except I con only put ...

Function Keys and RMS POS screen
Hi all I wonder is there a way to reconfigure the Function keys in the POS screen For example instead of F1 being displaying Help screen, I want to make it to reprint last receipt or some other function. Does anyone want to show your pretty customized POS screen ?? I want to get and idea how people's POS screen looks like Thank you Regards, Joie Joie, There is not built-in way to make this happen, but we have made this work for other customers in the past. Due to the nature of the program though, this is nothing we have a commercial application for, and would have to make s...

weibull distribution function
Hello, I need to make graph of Weibull distribution function with a = 10, b = 10 and count the modus of the function. I never did something like that. Can you give me detailed description how to do it? Thank you. Metroid -- Not entirely sure what you're trying to accomplish, but: A B C 1 1 =weibull(a1,10,10,false) =weibull(a1,10,10,true) and copy down through your various x values. Then graph the B and C columns using the A column as your X axis. Read help on the weibull function to see how to set it up. HT...

Changing Functional Currency
We have just set up Great Plains 8.0 with Multicurrency access. We originally had set up our functional currency as USD and our reporting currency as CDN. Transactions were entered but reversed so the system is at a clear balance. I need to change the functional currency to CDN but it wont allow me because transactions exist. Does anyone know a way around this? No - once you enter transactions you cannot change the functional currency. Your only choice now is to set up a new database. You can use an Automated Solution on CustomerSource to copy all the setups (except of course MC) from...

Is a Drop Down box the best function to use?
I have a worksheet template that I want use for 70 different countries. I am trying to figure out a way that allows me to choose and then fill out the template for a chosen country without having to create 70 worksheets. ie. I don't want to create a mother of a file. Can I somehow incorporate a drop down box or something similar which allows me to do this? Hi Have a look at Data|Validation. Using this you can create a drop-down box and link the list to a range of cells. Andy. "Ant" <Ant@discussions.microsoft.com> wrote in message news:D7518745-F8C1-4FE3-ACB7-5E7B4...

HR Self Service
We would like to request that the capability to add or change the State W-4 Withholding allowances be added to the HR Self Service Suite functionality. So that similar processes can be used for both the Federal and State W-4. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message...

Subtracting and multiplying tax numbers witht he IF function
Ok here is what i have i have created a payroll. now i need to add this: if pay is $0 - $95 deduct $0 plus 0c per dollar over 0 if pay is $96-$345 deduct $0 plus 20c per dollar over 96 if pay is $346-$480 deduct $63 plus 25c per dollar over 346 if pay is $481-$672 deduct $96 plus 40c per dollar over 481 if pay is $673-$961 deduct $183 plus 47c per dollar over 673 if pay is $962+ deduct $308 plus 48c per dollar over 962 And make it automatically deduct from the Gross Income. I have tried this =IF(C4>300,C4<400,(C4-43)*0.36,IF(C4>401,C4<500,(C4-60)*0.45,IF(C4>501,<600,(C4...

Using Pivot Table Function to Summarize
Hello, We are trying to summarize a long list of products that is Out of Stock in day-by-day format. We are using the Pivot table function and hoping it will only summarize the items that has the "qty" number on it. So when we review the list it will only display the Item #, Date & # of qty out of stock in day-by-day format (screenshot below). Item # 07/05/05 07/06/05 20040 1 (blank) 20041 (blank) (blank) 20042 2 3 20050 (blank) (blank) 20051 (blank) 2 20052 (blank) (blank) 20053 2 (blank) 20054 5 (blank) How can we remove the available items in stock "all (blank) r...

the expression you entered has a function name Microsoft Access can't find
I have a startup function that I run from the AutoExec macro that essentially checks the connection between the front end and back end and reconnects if necessary. This has been working for a really long time. Today, when I opened the database, I got the message: The expression you entered has a function name Microsoft Access can't find. Then I get a dialogue entitled "Action Failed" with the following information Macro Name: AutoExec Action Name: RunCode Arguments: TestStuff(0) It has three buttons, Step, Halt, Contine. Halt is the ony active one. If I run the macro by ...

type of or isa function
I can't believe how much my MFC memory is failing me and I threw out my books a few years ago, but I seem to remember a TYPEOF macro in MFC for telling either the type of an object (instance of class so and so) or the type of an object a pointer is referencing. I cannot seem to find it in the on-line help as it keeps bringing back C++ .Net answers which don't work. Is there not such a macro? If so, what is it. Thanks. No One wrote: > I can't believe how much my MFC memory is failing me and I threw out my > books a few years ago, but I seem to remember a TYPEOF macro in...

Problem With CDec Function
I have a query with one column containing "Expr1: CDec([ChkPmt])". When I try to run or store the query, I get a message saying the function has the wrong number of arguments. Is this yet another Microsoft bug? The function looks good to me. Thanks. With the database open, press Ctrl + g to bring up the VBA window. In the Immedieate window, paste in the following then hit Enter. Debug.Print CDec("123.222") Does it work there? If it does, it might be something else in the query messing things up. What version of Access? If 2007 did you enable options? ...

Time Only Functions
Hi, I am having a situation where i need to have a Start time and End time for a base date. Do you know is it possible to have 'time-only' fields? As an alternate i was looking to put two date-time fields, first for base date and start time, second for End time & auto populate second date from the first one. But i need to disable / hide just the datepart from second date-time field. Any clues? Your help is appreciated. Thanks. ...

IF function
Is there a limit to the number of IF statements you can have in one function? i.e. =IF(a1<a10,a10,(IF(a1<a11,a11,(IF(a1<a12,12,(IF(.................. and so on. I seem to get to 8 IFs and then get an error. That's it..........take a look at the VLOOKUP function......... Vaya con Dios, Chuck, CABGx3 "jonrtait" <jonrtait@discussions.microsoft.com> wrote in message news:1809AD7F-DF73-4B49-AEEC-E06D791CBE2A@microsoft.com... > Is there a limit to the number of IF statements you can have in one function? > > i.e. =IF(a1<a10,a10,(IF(a1<a11,a11,(IF(a1...

how do I delete the title bar from a cross functional flow chart?
I am using visio 2003. I nned more space for my flow chart so want to get rid of the title bar, or reduce it in size. ...

Help Please
Please post response as email is bogus to prevent spam. I am using Excel 2003. I hope I am clear in my description of my need. I get a weekly sales report and want to roll the numbers up into a ROLL UP sheet. The roll up will be static but the weekly sheet is dynamic (can fluctuate in the reporting). Universal to both is a store number, a UPC (identifier), and amount sold. The weekly sales will appear across columns (for tracking purposes). Example: 06-09-05 data will appear in column D, 06-15-05 data will appear in column E, etc. The other info will be like shown down column A: (Store)10...

Adding if to Average If Array function
Hi, I recently had help understanding the following formula {=IF(ISERROR(AVERAGE(IF(Score>0,Score))),"",AVERAGE(IF(Score>0,Score)))} Thanks to Luke M, Pete UK and David Biddulph who provided the explanation. I've now been asked to add to this formula so that if either Q3 or Q4 is greater than 4 then the average cannot be lower than 3. Q1:Q35 is the named range score. This is really complicated because I still need to have an average and I'm thinking that the If part is non array but the average part still needs to be an array. Can you mix and match ...

Business Portal Time Approval functionality
hi, I am not able to approve time and expense from business portal. I looked up the documentation and dont see anything on that side on how to set it up. Can anyone let me know how to setup the time approval functionality in Business Portal. Hi Mike, Make sure to assign your BP user into Project Approver role.(Site Settings-Manage Business Portal Users-Portal Roles). In Advance Roles, map your BP user into an Employee that is a valid approver in PDK(Manager or Supervisor). Login to PDK as an admin and go to User Setup window. Verify if the user who submitted his/her timesheet has a Ma...

Can I use the NOW() function in a formula?
I have a cell B1 that has NOW() time and another cell B2 that has NOW() date. I am trying to have data from another cell F1 brought in to the destination cell B3, when a given date and time occur. =(IF(AND(B1="23:00:00",B2="12/03/2009"),F1," ") This formulas does not work. The Clock is continuously active / always changing. Any suggestions would be appreciated. Thanks. The NOW() function returns both a date and a time. Even if you format the cell to display only date/time, all the data is still retained. NOte that if you did want just the d...

Search Function that Returns a cell name?
Hi, I need to have a function that will search a given worksheet (or a range of cells on a given worksheet) for a string and then report back the cell name where it was found. In other words, if i want to look for the word "monkey" on a workshee and "monkey" is in cell H83, I'd like it to return the value "H83". It seems that something like this would already exist as a canne function, but I can't seem to find it. If someone could suggest how to do this within Excel or failing that within an Excel VBA Macro, i would greatly appreciate it. Thanks -- Mes...

pure virtual function call iexplore.exe runtime error
Hi, sometimes i get a runtime error named "pure virtual function call" from the executable "iexplore.exe". i use a lot of dhtml technology and javascript inside my website i.e. it depends heavily on scripting. but i think it has something to do with the transition technology build-in the ie that i use (Interpage Transition with directx). If someone knows what this is, suggestions are appreciated... Thanks in advance... Best Regards Kerem G�mr�kc� hi, thank you for the information, but how can this occur within the internet explorer runtime. seems to be a bug or s...

FUNCTION #2
Hi dear friends, Anyone can help me in this prob. i want to know in my spreadsheet which is the last entry (i mean last cell which is having data) thanks in advance suresh tp Try UsedRange.Address to get the entire range you have used. Mangesh "SURESH" <way2suresh@hotmail.com> wrote in message news:e9u3gX3hFHA.2072@TK2MSFTNGP14.phx.gbl... > Hi dear friends, > > Anyone can help me in this prob. > > i want to know in my spreadsheet which is the last entry (i mean last cell > which is having data) > > thanks in advance > > suresh tp >...

Sum function
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I am trying to put together a spreadsheet for a business plan and am having problems with the autsum and autofill functions. Firstly, even though I do a simple autosum, if I change a value in a cell, the sum does not change. Secondly, if I try to autofill across columns, the values of those columns simply mirror the value of the first. In other words it copies it. I am at a loss how to get round it as I have been working w Excel for years and have never had this problem. I have experimented with a new worksheet with ...

qsBridge functionality out of QSRules
I think it would be usefull to use the methods/functions provided by the QSbride out of QSRules. For example the AddItem Fireevents does much more then the Entry.Item.add function from QSRules. thx, Martin ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.m...

IF Function 05-21-10
I have this formula currently set up... =VLOOKUP($A14,$B$7:$J$10,5)*W14 but I needit to not reflect the calculation if W14 has a "-" dash in the cell. I've attempted to add in a If formula to this but it isn't working out. Any sugguestions are greatly appreciated. By "-" do you mean a minus number or an actual dash?? if(w14<0,"",doyourthing) -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett@gmail.com "casdaq" <casdaq@discussions.microsoft.com> wrote in message news:123F94A8-9D83-4159-B642-070D684CB...