Similar Threads:
1.why doesn't SendKeys work consistently?
In my macro, I need to use the SendKeys command for various reasons. But
it's wierd: sometimes SendKeys works like I programmed them, sometimes just
some of the SendKeys commands work, sometimes Excel "calls" the SendKeys in a
different order than from what I've programmed, and sometimes SendKeys
doesn't work at all. All of the above can happen when
1. I run the macro using a keyboard command or
2. if I run the macro by merely clicking "Run" on the macro list form or
3. if I do an F8 within Visual Basic. (Actually, it seems like SendKeys
never works when I do the F8 thing.)
For example, here's a simple Macro that just won't run consistently/correctly:
SendKeys "%(=)" 'inputs an AutoSum (Alt-equals)
SendKeys "{ENTER}"
ActiveCell.Offset(-1, 1).Range("A1").Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(0, -1).Range("A1").Select
SendKeys "{END}"
SendKeys "{UP}"
SendKeys "{UP}"
I can't get a handle on it. Obviously, I'm doing something wrong. Any
hints/suggestions?
Dan
2.Autocorrect doesn't consistently work
A user of mine uses Word as email editor in Outlook 2003. Sometimes the
autocorrect works to correct words as he types while other times, it doesn't
autocorrect, even though it does underline it as misspelled. What could cause
this variance if the settings have NOT been adjusted in between uses?
3.vlookup does not work consistently
sometimes it returns #N/A for no reason.
e.g. see this formula
=IF(COUNTIF('competitor guideline
rates'!$C$16:$C$29,C12)=0,0,VLOOKUP(C12,'competitor guideline
rates'!$C$16:$D$29,2))
If you read it carefully, there is no way #N/A could be returned. In this
case, COUNTIF finds the argument in C12 in the array, but VLOOKUP does not!
4.Vlookup not working consistently
I've searched all through other posts and have not found anyone with a
similar problem. We have several workbooks that have been set up for at
least 3 years or more. Some of them suddenly, on any given line, will not
return the correct data even though it should be. At first it started with
just a line or two, and then slowly began to increase. At first we thought
the file was corrupt, so we re-created it. That didn't help. Now it has
started doing it in one of our other files--works fine, and then all of a
sudden starts returning zeros.
The formula I happen to be using right now is:
IF(ISERROR(VLOOKUP($A26,BUDGET,5,FALSE)),0,VLOOKUP($A26,BUDGET,5,FALSE))
Personally, I don't think it's a problem with the formula because the
formulas very from workbook to workbook. It can work fine on line 1 to 25,
quit working for 26 to 30, and then start working again on line 31. It's
bizarre.
Anyone have any ideas?
5.Error trapping for VLOOKUP...doesn't work so help!
I want to trap any error that may occur using a VLOOKUP.
I tried this in a cell:
=if(iserror(VLOOKUP(K1363,LOOK,6,FALSE)),"No lookup value error", VLOOKUP(K1363,LOOK,6,FALSE))
but this won't work because the value_if_false part of the IF() statement corrupts (for lack of a know word) the IF() statement. That is, if there actually is
an error with the VLOOKUP, the ISERROR will evaluate to TRUE but the VLOOKUP will also dump its error into the IF() statement and that error keeps the IF()
statement from operating.
Suggestions on trapping VLOOKUP errors and "fixing" them like I'm trying to do with the IF() statement? The IF() statement isn't necessary, it's just what I
though would logically work...
Toby Erkson
Oregon, USA
6. Why doesn't status bar update consistently?
7. Load-on-demand COM add-in for Word doesn't unload consistently
8. Load-on-demand COM add-in for Word doesn't unload consistently, co