Hi,

I’m trying to set up a database type program in excel using VBA, you may find yourself asking “why not use access” the answer is the boss wants excel. Believe me every day that I work on this thing I cry, sad…sad little tears :cry:
Anyway I’ve got it all done except one tiny thing. And if you could help me I would be extremely grateful.

I need to copy information form one cell in an active sheet, to another cell in an inactive sheet, without leaving the active sheet.

Here is a snipit of what I’m trying to do. “Not working though”

Rem copy cells form one sheet to another
   
  A = Sheet("Final Checklist").Range("F9")
   
  If A > 0 Then Sheet("Summary").Range("10B") = Sheet("Final Checklist").Range("B9")
   
  End If

If this is the wrong forum please don’t flame me I was just looking for a little help.

Thanks,

-Fatal Grace

P.S. I'm using MS Office 2003, OS Windows XP Pro

Ok… I’m trying something new

Private Sub CommandButton1_Click()
  Rem copy cells form one sheet to another
   
  A = Workbooks("QA Forms Master v1-7").Sheets("Final Roof Inspection Checklist").Range("F9")
   
  If (A > 0) Then Workbooks("QA Forms Master v1-7").Sheets("QA Summary").Range("10B") = Workbooks("QA Forms Master v1-7").Sheets("Final Roof Inspection Checklist").Range("B9")
   
  End Sub

When I click on the button if its greater then 0 I still get an error, I think I’m on the right track, but help is still very much welcomed.

Thanks,

-Fatal Grace

Posting to fix this code, I has a aixelsyd “dyslexia” moment if anyone needs to use the correct code here it is.

Private Sub CommandButton1_Click()
  Rem copy cells form one sheet to another
   
  A = Workbooks("Your Workbook Name").Sheets(" Your Sheet Name").Range("F9")
   
  If (A > 0) Then Workbooks("Your Workbook Name").Sheets("Your Sheet Name").Range("B10") = Workbooks("Your Workbook Name").Sheets(" Your Sheet Name").Range("B9")
   
  End Sub

I had 10B I should have put B10

Thanks and unless you need this code disregard this post.

-Fatal Grace

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.