Only Simply Vba Key Trapping

Mar 23, 2007

I only want to do a "macro" in VBA that must do two things
record the keys pressed (during only 5 minutes)
and save the results in a text file

It is the only code in VBA I try to write

I found public documentation (legal stuff I mean)
about GetKeyState

I have snippets of code for save data as txt file

But I don't succeed in finishing the all code.

My purpose is to show to my daughter in law that if she doesn't respect rules
on the net, I'm able (but I don't want to really do it, it's just a threat) to know what she's doing.

If I want a real keylooger, I've downloaded one on the net.
I haven't done that and I don't want to.

I don't think a vba code with
the function getkeystate and Open file (an only that)
is a danger.

View 3 Replies


ADVERTISEMENT

Error, #DIV/0!, How Do I Make It Simply Say 0 If It's Truly Zero

Oct 12, 2009

I'm trying to put this formula into cell B31...

ActiveCell.FormulaR1C1 = "=R[-2]C/R[-1]C"

Current value of B29 is "1"
Current value of B30 is "0"
Result in B31 after formula is "#DIV/0!"

Mathmatically, the result should be "0"

I read Excel's help and it said something about putting this in...

IF(B31=0,"0",B29/30)

which I tried to, but it's giving me other errors.

How can I get cell B31 to put in a "0" if either B29 or B30 have a zero in their cell?

View 9 Replies View Related

Keystroke Trapping

Jan 18, 2007

Since I practically never deliberately hit Control-2 through Control-5 -- and do hit them "more than never," I thought I'd grab them with the KeyPress event (or KeyDown?). Then it hit me that I'm not sure where it would go.

This is for every workbook so this would generically reside in personal.xls. ThisWorkbook doesn't seem like the right place; I want its scope to be ActiveWorkbook. Would it require a class module (actually, I already looked, and don't see any keyboard events under "App")?

View 9 Replies View Related

How To Simply Enter Minutes And Seconds

Apr 1, 2013

In a column range, i need to enter sequences of minutes and seconds as follows:

12:08
13:19
16:49
28:13

I had changed the format of cells to mm:ss but if i enter 12:08 excel shows it as 08:00 unless i enter it with the hour (00:12:08)

Is there any way to avoid entering the hour each time but simply minutes and seconds?

View 4 Replies View Related

Trapping A Msgbox During Validation

Oct 23, 2008

The below code validates values in a combined range. Values can be a 0 or a 3-digit combo of values 0 through 4. The problem is that whenever the Delete key is pressed to delete an acceptable value, the msgbox appears. How can the msgbox appear ONLY if a user tries to enter a wrong value--the cells can be, and are, left null regularly, so the msgbox is annoying.

View 3 Replies View Related

Trapping Userform Events

Jan 9, 2009

I'm trying to trap the events of a user form in a class of mine. At the top of my class I have the standard:

View 2 Replies View Related

Trapping File Version In VBA?

Dec 11, 2012

how I could amend the following code so that my target worksheet includes file versions? The worksheet range "Folder" contains a string specifying the target folder and the worksheet range "IncludeSubFolders" is either TRUE or FALSE. I can trap FilePath, FileName, FileSize and DateModified fine but not File Version (I'm working with DLL libraries).

Code:

Dim iRow As Long
Sub ListFiles()
iRow = Range("DatabaseStart").Offset(1, 0).Row
Call ListMyFiles(Range("Folder"), Range("IncludeSubFolders"))
End Sub

[Code]......

View 1 Replies View Related

Error '9' Trapping Worksheet

May 1, 2007

IS there any code where I can use to error trap worksheet so that if any error occurs like runtime error 9 then it can be traped.

View 2 Replies View Related

Error Trapping When Reading From Another Workbook?

Jun 3, 2014

I'm using VBA to open several files and pull information from them into a workbook with the hopes of eventually outputting the information to a formatted text file that can be uploaded to a data transfer system that will fill out a form for me. The problem I am finding is that the workbook that I need to access has faulty VBA code that executes everytime the workbook is opened. I realize the easiest solution would be to fix the code that is faulty however the workbook that I am accessing is automatically generated for each product with the faulty code embedded requiring me to handle the error on the back end. Attached is my code and I attempted using error trapping to handle this issue but I've concluded that I either lack understanding of error trapping or the fact that the error is in a cascaded workbook complicates the error trapping code.

View 5 Replies View Related

Trapping Outline Expand / Collapse

May 15, 2009

I suspect I need a class module for this...

How do I trap the event when a user chooses to expand / collapse outlines (columns in this instance) on a worksheet?

Basicallly, when attempting to expand I want to prompt the user to enter a password and then unprotect the sheet. And if collapsing to prompt again and then protect the sheet. I have this bit covered, just not sure how to trap the event.

View 9 Replies View Related

Functional Argument That Simply States To Display The Output As .843

Feb 4, 2010

column I row 11 has a functional argument that simply states to display the output
as .843 I need to edit it to .844 and I cannot seem to find out where or howto edit it.

There are others like this that I need to do too so I need to learn how to do it. Not just have someone do it for me.

ALSO as you can see this sheet displays #N/A all over the filled in cells... I would like them to be blank until I enter some pertinent info... I tried this is cell m7 BUT as you can see in m12 it goes back to the N/A

View 4 Replies View Related

How To Transfer Autocorrect Words To Other Computer Simply Export And Import

Sep 20, 2013

simply to say i want export and import all my "auto correct" words to other computer instead of typing manual...

Here some example am using daily ..

PLAN MISMATCH IN CPOS WITH CAFP 1
P2P NOT ELIGIBLE P 2
NEED CLARITY ON PLAN AND TOPPINGP 3
NEED CLARITY ON TOPPING P 4
NEED CLARITY ON RECEIPT AMOUNT AND RECEIPT NUMBERP 5
NEED PLAN APPROVAL P 6

if i type P1 in a cell it will show PLAN MISMATCH IN CPOS WITH CAF, i have like this many words. i want load it another one computer instead of adding manual typing. is it possible?

View 5 Replies View Related

Excel 2007 :: How To Retrieve Error Trapping Options In VBA

Aug 13, 2014

How can we "read" information from the VBE Error Trapping options (Break on All Errors/ Break in Class Module/ Break in Unhandled Errors) programmatically?

Background: I am developping a spreadsheet that needs to be sent around to distant users. Some of them might not have the default "Break on Unhandled Errors" setting), which would just make my programme fail or risk to fail...

This issue has been covered in the thread below, but the proposed solution doesn't work on my side (always returning the same output!): [URL] .....

Hint: it has been suggested to look into the registry, which the linked post does.

Ideally, I would love to be able to change the setting programatically, but that seem near to impossible in excel 2007 VBA (unless calling an external programme that closes and restarts excel after having changed the option?...)

View 10 Replies View Related

Test And Sum The Same Range Of Cells In Each Sheet By Simply Coping And Pasting The Formula

Feb 2, 2010

On Sheet1, Row 2 I have my columns named January-December, which correspond to the names of the other 12 sheets in my workbook. I want to test and sum the same range of cells in each sheet by simply coping and pasting the formula. I am using INDIRECT and SUMPRODUCT, but is there a better way? It seems to have caused the sheet to run slowly. Perhaps it's just the amount of data. Here is an example of the formulas I am using:

=SUMPRODUCT((INDIRECT("'"&B2&"'!$B$3:$B$200")=$A$2)*(INDIRECT("'"&B2&"'!$C$3:$C$200")="Yes")*(INDIRE CT("'"&B2&"'!$E$3:$E$200")))

This gives me the intended result. B2 in this case is January. C2 is February and so forth.

View 3 Replies View Related

Resample Data: Total Number Of Points Reduced By Averaging The Data Not By Simply Deleting One Of Every Four Rows

May 16, 2006

I have several files of data that are from a data logger. The data is broken up by day. Each day has roughly 43000 rows of data, at its sample rate. This has made charting the data a nuisance. Is there a way to resample the data so it fits in the 32000 points excel can chart? In the future I will set a sample rate that will keep the number of points below the 32K per series. I would like to be able to have the total number of points reduced by averaging the data not by simply deleting one of every four rows.

View 5 Replies View Related

Are The Workbook Environment And The VBE Environment Simply Two Different Forms

Jun 16, 2009

1. Are the Workbook Environment and the VBE environment simply two different forms? Meaning, when I press alt+F11, am I just switching between 2 default forms?

2. Is Excel itself written in VBA? And if it's written in VB or C, which would make more sense, is the GUI side of things written in VBA?

The reason I ask is pretty simple. I really love the way the Workbook environment and the VBE environment are set up. I want to use them as models for my own forms. Both environments seem little more than two very complex forms. And I want to replicate so much about them.

3. But is it possible to replicate anything I see as part of these environments in my own forms?

For instance, what is the VBE Project window? Is it a ListBox? I need to code a form that does something very similar to the way it groups and collapses Projects and their sub-groups like Microsoft Objects, Sheets, ThisWorkbook, etc. I've used grouping to make rows and columns collapsible. But never items in a ListBox... But am I right to assume that I can do so, just because Excel's environment does it? Meaning, can it be assumed that anything I see Excel doing itself, a talented programmer can replicate in forms of his own?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved