Macro combined w/cell link

  • Thread starter Thread starter Jennifer
  • Start date Start date
J

Jennifer

I have designed my own form and get information into sheet
one with a macro. Problem is everytime I use the macro it
moves all information from A1 down to A2. No big deal till
I try to use a cell linked to A1. Every time the cell
information moves to A2 and down the cell in sheet 2 the
formula moves with it. Example =sheet1(a1) after the macro
the formula becomes =sheet1(a2). I would like it to stay
A1. And adding the $A$1 hasn't worked. Please help!

Sheet 1 Example
A B C D
Date FName LName Etc.
8/20/03 Jennifer Davis x x x


Sheet 2
A B C D
=sheet1(a1) =sheet1(b1) etc.
After the macro enters info into sheet 1 the formula now
=sheet1(b2)
I want it to stay A1
 
"Jennifer",

Have you tried tagging something at the end to redefine the cell link? Eg:

Range("Sheet3!A1").FormulaR1C1 = "=Sheet1!RC"

HTH,
Andy
 
Is that a formula or is it written in VBA?
It's VBA code.
I have no experience in VBA
Not true, you already said you've run a macro.

Press ALT+F8 to bring up the Macro dialog. Your macro should be listed,
select (single-click) it then click the Edit button.

You should see the code. It's just a list of instructions. Go to the front
of the last line (End Sub), press Enter. Paste the code above this line
(NB - it has to stay all on one line).

To start learning VBA, perform some basic actions while recording a macro,
then study the code to get an idea of terminology & syntax.

Rgds,
Andy
 
Back
Top