Results 1 to 3 of 3

Thread: Access 2000 to Excel

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Posts
    69

    Question

    I have an access 2000 macro that exports a table to an excel spreadsheet. The macro worked fine for a while but now it just halts and gives me the message "Cannot delete spreadsheet cells"
    simple code:
    Private Sub cmdTransfer_Click()
    On Error GoTo Err_cmdTransfer_Click

    Dim stDocName As String

    stDocName = "transfer"
    DoCmd.RunMacro stDocName

    Exit_cmdTransfer_Click:
    Exit Sub

    Err_cmdTransfer_Click:
    MsgBox Err.Description
    Resume Exit_cmdTransfer_Click

    End Sub
    Can anyone help?
    Thanks in advance
    Bill

  2. #2
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024
    I think we might need more code than that. It doesnt really show anything other than the fact you are running another macro and catching the errors.
    MSVS 6, .NET & .NET 2003 Pro
    I HATE MSDN with .NET & .NET 2003!!!

    Check out my sites:
    http://www.filthyhands.com
    http://www.techno-coding.com


  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Posts
    69
    Nailed the problem!
    The Excel workbook was on set to display 3 sheets in a new workbook. All three sheets currently had data on them so access would not delete any of the sheets to make room for the new one.
    Thanks anyway to all who replied!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width