Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-04-2017, 08:00 PM
Forum2000s Forum2000s is offline VBA Newbie (Trying to write a code to copy and paste info from one sheet to another) Windows 7 32bit VBA Newbie (Trying to write a code to copy and paste info from one sheet to another) Office 2010 32bit
Novice
VBA Newbie (Trying to write a code to copy and paste info from one sheet to another)
 
Join Date: May 2017
Posts: 2
Forum2000s is on a distinguished road
Default VBA Newbie (Trying to write a code to copy and paste info from one sheet to another)

Hello all,

I'm new to using VBA but I've been trying to learn because I need to create a QA Call Monitoring form for a call center; the workbook needs to have a database sheet. I need the information in the cells on the QAForm sheet, to copy to the QADatabase sheet, and clear the QA form after. Can someone take a look and tell me what I am doing wrong?

I would really appreciate any input to help get this to work.

I'm using Excel 2010.




This is what I've entered:

Sub

erw = QADatabase.Cells(1, 1).CurrentRegion.Rows.Count + 1

QADatabase.Cells(erw, 1) = Range("B3")
QADatabase.Cells(erw, 2) = Range("C3")
QADatabase.Cells(erw, 3) = Range("D3")
QADatabase.Cells(erw, 4) = Range("E3")
QADatabase.Cells(erw, 5) = Range("F3")
QADatabase.Cells(erw, 6) = Range("G3")
QADatabase.Cells(erw, 7) = Range("L3")
End Sub
Attached Files
File Type: xlsm Team Weathers QA Form Test 6.xlsm (122.2 KB, 12 views)
Reply With Quote
  #2  
Old 05-05-2017, 07:39 AM
NoSparks NoSparks is offline VBA Newbie (Trying to write a code to copy and paste info from one sheet to another) Windows 7 64bit VBA Newbie (Trying to write a code to copy and paste info from one sheet to another) Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

You're not fully qualifying things in telling Excel what to work with. Try like this...
Code:
erw = Sheets("QADatabase").Cells(1, 1).CurrentRegion.Rows.Count + 1
Sheets("QADatabase").Cells(erw, 1) = Sheets("QAForm").Range("B3").Value
'etc
Reply With Quote
  #3  
Old 05-07-2017, 04:51 AM
Forum2000s Forum2000s is offline VBA Newbie (Trying to write a code to copy and paste info from one sheet to another) Windows 7 32bit VBA Newbie (Trying to write a code to copy and paste info from one sheet to another) Office 2010 32bit
Novice
VBA Newbie (Trying to write a code to copy and paste info from one sheet to another)
 
Join Date: May 2017
Posts: 2
Forum2000s is on a distinguished road
Default

Quote:
Originally Posted by NoSparks View Post
You're not fully qualifying things in telling Excel what to work with. Try like this...
Code:
erw = Sheets("QADatabase").Cells(1, 1).CurrentRegion.Rows.Count + 1
Sheets("QADatabase").Cells(erw, 1) = Sheets("QAForm").Range("B3").Value
'etc
Awesome! I was so frustrated with this.

Thank you for the help!
Reply With Quote
Reply

Tags
vba code



Similar Threads
Thread Thread Starter Forum Replies Last Post
copy a row and paste the row into another sheet more then one time:macro waqar1239 Excel Programming 1 04-07-2017 09:57 AM
VBA Newbie (Trying to write a code to copy and paste info from one sheet to another) How to copy excel sheet withe HEADER and Paste into new sheet? cloudforgiven Excel Programming 6 01-05-2017 07:30 PM
VBA Newbie (Trying to write a code to copy and paste info from one sheet to another) Open csv files & copy and paste info into master file gbaker Outlook 9 04-22-2016 11:02 PM
copy checkbox string and paste it in excel sheet MOHAMMEDSALMAN Excel Programming 7 10-29-2015 03:50 AM
Newbie to excel for starters, needing to transfer info from sheet2 to universe sheet. rogcar75 Excel 0 08-12-2014 07:21 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:35 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft