Server Exception Error
I am writing a program that gets data and writes it to excel files. I am having trouble with a section of code that copies the formulas from three cells and pastes them to three cells directly below.
The problem is that if I have the excel file open prior to running the program, it completes with no problems. If I allow the program to open the file I get the following error:
runtime error '-2147417851 (80010105)'
Automation error
The server threw an exception
The file is on our plant LAN server on a shared drive.
The code that copies and pastes the cells is:
wkbStartData.Worksheets("Unit " & CStr(i + 1)).Range("R" & _
CStr(CInt(txtWorkRow) - 1) & ":T" & CStr(CInt(txtWorkRow) - 1)).Copy
wkbStartData.Worksheets("Unit " & CStr(i + 1)).Range("R" & _
txtWorkRow & ":T" & txtWorkRow).PasteSpecial Paste:=xlFormulas, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Any ideas or suggestions?
Thanks to all.
Thanks,
Ray
|