Slight change now macro error

B

Bob

Active Cell being A1, Date D15, Payment Received E15 , H14 Value which is
subtracted by its value to get Zero in H15
But I am getting a error now on the last line!

Sub PayRecieved()
With ActiveCell
..Offset(14, 3) = (Date)
..Offset(14, 4).Value = "PAYMENT RECIEVED"
..Offset(14, 7).Formula = "=-" & ActiveCell.Offset(13, 6)
End With
End Sub

This was the original but wanted to change the active cell to A1 instead of
D15
Sub PayRecieved()
With ActiveCell
..Value = (Date)
..Offset(0, 1).Value = "PAYMENT RECIEVED"
..Offset(0, 4).Formula = "=-" & ActiveCell.Offset(-1, 4)
End With
End Sub
--
Thanks in advance for your help....Bob Vance
..
..
..
..
 
B

Bob Phillips

Bob,

I think it is just picking up G14 instead of H14.

Try this

Sub PayRecieved()
With ActiveCell
..Offset(14, 3) = (Date)
..Offset(14, 4).Value = "PAYMENT RECIEVED"
..Offset(14, 7).Formula = "=-" & .Offset(13, 7)
End With
End Sub

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top