Hi,
I'm just beginning to learn VBA. I am wondering if using an "if" statement or a case statement would be good ways to check two worksheets in two different workbooks to see if their names match? I could use some help correcting my syntax too:
I know this is basic stuff but I'm having a little trouble getting the hang of it.
Thanks in advance for your help.
I'm just beginning to learn VBA. I am wondering if using an "if" statement or a case statement would be good ways to check two worksheets in two different workbooks to see if their names match? I could use some help correcting my syntax too:
Code:
For 1 to ws.count
If Worksheet("one").Name = Worksheet("two").Name
Worksheet("one").Range("A1:G84").Copy
Worksheet("two").Range("A1:G84").Paste
Endif
Next ws.Count
I know this is basic stuff but I'm having a little trouble getting the hang of it.
Thanks in advance for your help.