[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Open
  • Priority: Low
  • Security: Public
  • Views: 65
  • Last Modified:

Run-Time Error 2147221080 (800401a8)

Every time I attempt to run excel through a database we set-up in it, I get the error "Run-Time Error 2147221080 (800401a8) Method Worksheet of object _Workbook failed."

The guy we had create this doesn't know what is wrong. I am not an expert of excel so I can't explain much. From what I know, it seems when we run the program, it adds a "1" to the end of one of the templates it's referring to. This stops our whole process. We cannot figure out where the 1 is being added from and why. PLEASE HELP!!

The debugger refers to the line, wkbkOutput.Worksheets(1).Range("A" & lngOutputRow).Value = wkbkInput.Worksheets(1).Cells(lngInputCurrRow, INPUT_COLUMN_DATE) ' date


This was working perfectly fine last week, all the sudden on Monday this error happened. Nothing was updated on my computer. The issue came out of the blue, but has been happening to other people in my office.
0
Maelynn Dickson
Asked:
Maelynn Dickson
  • 2
3 Comments
 
HainKurtSr. System AnalystCommented:
need to see the values here

wkbkOutput.Worksheets(1).Range("A" & lngOutputRow).Value = wkbkInput.Worksheets(1).Cells(lngInputCurrRow, INPUT_COLUMN_DATE)

Open in new window


put this

MsgBox lngOutputRow & "-" & lngInputCurrRow & "-" & INPUT_COLUMN_DATE

Open in new window


or this

dim test
test = lngOutputRow & "-" & lngInputCurrRow & "-" & INPUT_COLUMN_DATE
MsgBox test

Open in new window


before offending code and save/close and open again and see what is happening...
0
 
Maelynn DicksonAuthor Commented:
Do I put that new code in replace of the current one?


Thanks!
0
 
HainKurtSr. System AnalystCommented:
you said it is giving error and showing some code...
copy paste this on top of that line, save close open and you should see a popup with values
so we can see whats wrong, hopefully
0

Join & Write a Comment

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now