Heippa!
Yritän luoda excel macron excel tiedostoon joka lukisi tietoa toisesta excel tiedostosta. Valitettavasti VB taitoni ovat puutteliset joten en tiedä miten. Arvostaisin jos joku voisi auttaa.
Riku
Heippa ThaRez!
tässä yksi tapa...
Private Sub CommandButton1_Click()
Dim this As Workbook, that As Workbook
Set this = ActiveWorkbook
Application.ScreenUpdating = False
Workbooks.Open (Environ("userprofile") & "\Työpöytä\Testi.xls")
Set that = ActiveWorkbook
that.Sheets(1).Activate
ActiveWorkbook.ActiveSheet.Range("A1:" & _
ActiveWorkbook.ActiveSheet.Cells.SpecialCells( _
xlCellTypeLastCell).Address).Copy Destination:= _
this.Sheets(1).Range("A1:" & _
ActiveWorkbook.ActiveSheet.Cells.SpecialCells( _
xlCellTypeLastCell).Address)
this.Activate: that.Close
Set this = Nothing: Set that = Nothing
Application.ScreenUpdating = True
End SubAihe on jo aika vanha, joten et voi enää vastata siihen.