Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
An 400 error msg
Hi there, Im program a "simply" copy-paste from one
worbook to another workbook cells, but it send me a strange error message just "400", I don't know whats happen, could someone can tell me whats wrong with my code?... here's: Sub Actualiza2() ActiveWorkbook.Unprotect Dim myCurrentWorkbook As Workbook Dim myDataSourceWorkbook As Workbook Dim myCurrentWorksheet As Worksheet Set myCurrentWorkbook = ActiveWorkbook FileToOpen = Application.GetOpenFilename("Excel Files (*.xls), *.xls") Set myDataSourceWorkbook = Workbooks.Open(FileToOpen) myDataSourceWorkbook.Sheets(1).Range("C2:F2").Copy myCurrentWorkbook.Sheets("H-M").Cells(ActiveCell.End (xlDown).Offset(1, 0).Row, 4).Paste Application.DisplayAlerts = False myDataSourceWorkbook.Close Application.DisplayAlerts = True ActiveWorkbook.Protect Structu=True, Windows:=False MsgBox "Log Import Complete", vbOKOnly End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Visual Basic Error Run Time Error, Type Mismatch | Excel Discussion (Misc queries) | |||
Counting instances of found text (Excel error? Or user error?) | Excel Worksheet Functions | |||
Automation Error, Unknown Error. Error value - 440 | Excel Programming | |||
Error 50290: Error writing to Worksheet while using an ActiveX Control | Excel Programming |