I have a macro copying data from one to another sheets within a .xls file. I would like now the do the same, however the data should be copied into another file (workbook) without opening this file. I cannot find a way to do so. Can anyone help? Thx
Ooops, missed that bit! You could open the file, carry out the operation, then close it in code so the user would know very little about it. That would also mean that you would know the name of the workbook.
However, Andrew is correct, there's no way of doing this without opening the workbook.
Here is the code, i am trying to record my entries into a central file...
I would like to have the sheets "New" and "RECORD" in two separate workbooks... have tried rjp proposal by adding the complete path to all sheets (ie Workbooks("C:\Admin\LogBook.xls").Worksheets("RECORD").Calculate) but this doesn't work...
Any other idea?
Dim LineCounter As Integer
Dim LineCounter2 As Integer
LineCounter = Sheets("New").Range("LinesRef").Value
LineCounter2 = Sheets("RECORD").Range("LinesRef2").Value
Set RangeStart = Range("InputRef").Offset(1, 0)
Set RangeEnd = Range("InputRef2").Offset(LineCounter, 0)
Set PasteStart = Range("DateRef").Offset(LineCounter2, 0)
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
Thx a lot Rob, this looks almost perfect!
I get a bug at
By remplacing it by a cell (ie Range("A6")) this works well, but for some reason it doesn't recognise the PasteStart value anymore (this works within the same file).