Wrox Programmer Forums
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 13th, 2004, 09:01 AM
Registered User
 
Join Date: Jun 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Security Exception Error nici ASP.NET 2.0 Basics 0 May 23rd, 2007 12:03 PM
[Urgent] Server Side custom exception tjacemy General .NET 3 April 3rd, 2007 07:44 AM
Exception error lewright Java Basics 8 July 17th, 2006 06:35 PM
Server exception error edray Beginning VB 6 1 July 13th, 2004 09:43 AM
Exception Error aadz5 ASP.NET 1.0 and 1.1 Basics 1 November 14th, 2003 10:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.