Receiving a Compile Error "Invalid Use of Property"

XLA

New Member
Joined
Dec 16, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi,

I'm new to VBA and am creating a macro to generate an email in outlook. When I click the button to use the macro, I'm met with an error: "Compile error: Invalid us of property."

The first line item of the procedure is what is being highlighted. Any help for resolving this would be greatly appreciated.

1671216025302.png


Thanks,
XLA
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hi,

I'm new to VBA and am creating a macro to generate an email in outlook. When I click the button to use the macro, I'm met with an error: "Compile error: Invalid us of property."

The first line item of the procedure is what is being highlighted. Any help for resolving this would be greatly appreciated.

View attachment 81072

Thanks,
XLA

Hi XLA, I've never tried it personally, but I hunted around and found this, it might be useful to you, of course change the e-mail address to your own for testing.

1671219233838.png
 
Upvote 0
Hi XLA, I've never tried it personally, but I hunted around and found this, it might be useful to you, of course change the e-mail address to your own for testing.

View attachment 81074
Hi TedX,

I used what you provided above and had a similar issue. But looking at what I inputted before, I saw that later in my script, instead of an "=" I had a "-". After I fixed that, it ran without a problem.

Thanks!
 
Upvote 0
Hi TedX,

I used what you provided above and had a similar issue. But looking at what I inputted before, I saw that later in my script, instead of an "=" I had a "-". After I fixed that, it ran without a problem.

Thanks!

Great to hear mate, well done (y)
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,939
Members
449,094
Latest member
teemeren

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