Thread: sendkeys string
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
hawki hawki is offline
external usenet poster
 
Posts: 27
Default sendkeys string

Thanks for your assistance.

The results I received when I was positioned in cell B1, ran the macro by
holding down alt + f8, selecting the macro, and pressing enter is as follows
for column A and column B:

12 =A1-4
22
44

The results I receive when I ran the macro by using the shortcut key "ctrl +
t" is a single formula in cell A1 as follows. All other information was
erased.

=A1-4


--
l-hawk


"Gary''s Student" wrote:

You don't need both the ~ and the down

In A1 thru A3 I enter:

12
22
44

I select B1 and run:

Sub lop()
For Count = 1 To 3
SendKeys String:="={left}-4~"
DoEvents
Next Count
End Sub

The macro enters the following formulas in B1 thru B3:

=A1-4
=A2-4
=A3-4


Is that want you want it to do??
--
Gary''s Student - gsnu200720