Run-time error'9'

Copper Contributor

Hello all, my company uses the excel spreadsheet for the majority of our companies operational records. I recently ran into a problem using a macro.

 

1. We have what is called a "lead sheet". On this sheet all potential customers are listed and all the potential outcomes. When a job is sold we change the drop down tab to "sold" like pictured below. Once the person is done entering all of the lead onto this sheet we click the "Run "Lead" to Job-Pebblestone" Macro button. All the jobs that have been denoted as "sold" then get transferred over to our Job sheet for our schedulers and installers to take it from there.

 

1st snip.png

 

2. When the Macro button is pressed this is what appears. 

 

 

2nd snip.png

 

 

3. When the "Debug" button is clicked the image below is what pops up. 

 

 

3rd snip.png


 Can someone please help me correct this issue? It seems like the issue began when I was on the quarantine layoff and the person that was entering this information said they did not have this problem.

 

Thank you all in advance!! 




















 

5 Replies

@Josh2153  Can you make sure the sheet/tab name has not been changed  ?

 

Can you provide more information like

- A picture of all the sheets, and also the complete screenshot of all vba codes.

 

 

@Josh2153 You havent used the DIM for sht variable try typing

 

DIM sht as Workbook and then try again executing it.

 

Please let me know if it doesnt work 

Or Try typing this

Dim sht as Worksheet

You have to type both the above just before set line

Thank you!! That thought never crossed my mind haha. But when I looked it looks like my boss changed the name of the file without notifying anyone @ElElyon 

Is your problem solved bro@Josh2153