Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to copy cells (one at a time) from Excel to a resource
management program that is password protected on my company intranet. It is not possible to paste columns in one go, so it must be done on a copy cell/paste to cell repeat basis. I've tried running the following code which I've seen from reading another question but it errors at the Get application point. Given the protection on the destination program, can this be done and if so, how? The code I tried unsuccessfully was: CombineFiles() Range("A1").Select MyBook = ActiveWorkbook.Name MyTargetCell = ActiveCell.Address MySource = Application.GetOpenFilename Workbooks.Open Filename:=MySource Range("A1").Select Set myRange = Range(Selection, ActiveCell.SpecialCells(xlCellTypeLastCell)) '<-Solution : Take out the select here because you are setting the myRange with this line myRange.Copy Application.DisplayAlerts = False '<-- This will save you from having Excel notify you that you placed a large amount of info on the clipboard before closing the source file ActiveWorkbook.Close Application.DisplayAlerts = True Workbooks(MyBook).Activate Range(MyTargetCell).Select ActiveSheet.Paste ActiveWorkbook.Save 'SaveAs MySource <-- this is saving the Activeworkbook as the Source workbook (I don't think that is what you want to do?) Many thanks for your help! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How copy/paste values in Excel doc protected sheet 2 other doc? | Excel Discussion (Misc queries) | |||
How can I copy/paste protected cells in excel | Excel Discussion (Misc queries) | |||
How to Copy a Password Protected Excel Worksheet | Excel Worksheet Functions | |||
Copy/Paste of separated columns from Excel to a thirdparty application | Excel Programming | |||
running an password protected application | Excel Programming |