VBA Code no working.

jmk15315

Board Regular
Joined
Nov 7, 2021
Messages
59
Office Version
  1. 2013
  2. 2010
Platform
  1. Windows
So I have an interesting, yet confusing question. I have a worksheet that has vba code for a given task, that works flawlessly. I have created a new, seperate worksheet, but I needed the same funtion as the VBA Code from the first file. Rather that retype the code, I did a copy/paste from file #1 to File #2. While the code still works in File #1, it will not work in File #2

1687359685202.png



The highlighted portion is where the code crashes.

I am using the spreadsheet on the same computer, so I do not understand why I would have this issue in one file, but not the other.

Thoughts?
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
In the new file, did you add reference to Microsoft Outlook xx.x Object Library in Tools / References menu of the VBE pane ?
 
Upvote 0
In the new file, did you add reference to Microsoft Outlook xx.x Object Library in Tools / References menu of the VBE pane ?
I did not. I am drawing a blank as to how I need to get to that screen.
 
Upvote 0

Forum statistics

Threads
1,215,201
Messages
6,123,617
Members
449,109
Latest member
Sebas8956

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top