Shan S
Shan S

Reputation: 49

VBA Userform and calling subs in sheets?

Is there a way I can call my subs on sheet from Userform?

I have a userform which calls Main , Main is a sub on sheet1. but it searches for main on module. Any idea how to call?.

Thanks

Upvotes: 0

Views: 3298

Answers (1)

rory.ap
rory.ap

Reputation: 35260

The sub would have to be public, and you would have to qualify the reference with the name of the sheet, e.g. Sheet1.Main instead of just Main.

Upvotes: 1

Related Questions