Entering from one sheet to another problem

APPPRO

Active Member
Joined
Aug 6, 2002
Messages
256
I've come up with the following. It works great to enter several lines of data on Sheet FORM to the next empty row on Sheet MAIN.
But I would like NOT to have to Activate Sheet MAIN inorder to do it.

Actually, I would like to have 2 WorkBooks instead.

Any ideas?

Sub ENTER_TO_DB()
'
' ENTER_TO_DB Macro
'
'

Range("E1:L4").Copy
Sheets("MAIN").Select
Range("M16").Select
Cells.FindNext(After:=ActiveCell).Activate
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Sheets("FORM").Select
Application.CutCopyMode = False
End Sub
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
I've assumed that the sheet FORM is in Book1 and that the sheet MAIN is in Book2. I've also assumed that both books are initially open:<pre>
Public Sub MyCopy()

Workbooks("Book1").Worksheets("FORM").Range("E1:L4").Copy _
Destination:=Workbooks("Book2").Worksheets("MAIN").Range("M65536").End(xlUp)
End Sub</pre>

_________________<font color = green> Mark O'Brien
This message was edited by Mark O'Brien on 2002-10-16 17:41
 
Upvote 0
Mark,
Can't seem to get that to work right. I need to do a Find on the 2nd workbook before I do the paste, also after the copy.

I have done the following but it doesn't run. Any ideas?

Worksheets("data").Range("a5:Bj14").Copy
Workbooks("FABRIC db").Worksheets("db").Range("h16").Select
Cells.Find(What:="", After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Workbooks("Fabric ENTRY").Activate
End Sub
 
Upvote 0

Forum statistics

Threads
1,222,405
Messages
6,165,864
Members
451,988
Latest member
boo203

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top