View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
papou papou is offline
external usenet poster
 
Posts: 110
Default Copy from one workbook to another

Hi Ole
Please amend accordingly with your workbook and sheet names:
Private Sub CommandButton1_Click()
Dim ToOpen$
ToOpen = ThisWorkbook.Path & Application.PathSeparator & "23032005.xls"
Workbooks.Open (ToOpen)
ThisWorkbook.Worksheets("Feuil1").Range("A1:E100") .Copy _
Workbooks("23032005.xls").Worksheets("Feuil2").Ran ge("A1")
End Sub

HTH
Cordially
Pascal

"Ole" a écrit dans le message de
...
Hi,

I want to copy som cells from workbook 1 to a closed workbook 2 with a
commanbutton,
when i click the command button from workbook1 i want i to open workbook2
and copy the
cells to workbook2, anyone got an idea.

Any help is apressiaded ( and that i cant spell to :-)

Ole


--
Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
Den har indtil videre sparet mig for at få 0 spam-mails.
Betalende brugere får ikke denne besked i deres e-mails.
Hent den gratis her: www.spamfighter.dk