Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Turkey Manager

0

Hello,

I am getting such a kick out of the Turkey Takeover code.  I have most of it working except when I open my own workbook where I copied the code, the TurkeyManager does not run.  Perhaps the error is related to the Private Sub Workbook_SheetActivate ?  I renamed my module where all of the public routines are to "Elf".  Maybe that's the problem?

Answer
Discuss

Answers

0
Selected Answer

Hi again Susan.

In the attached modified file, the module is renamed Elf (as you said) but I added this simple event macro:

Private Sub Workbook_Open()

    ' switch sheets on opening so the Turkeys start to run on second sheet
    Sheet1.Activate
    Sheet2.Activate

End Sub

This quickly switches sheets when the file is opened and the turkeys start to run straightway.

You can just copy that code to the ThisWorkbook section of your file (in VB Project Explorer) The tutorial shows how to add extra turkeys (e.g. to the Empty sheet) I think.

Hope this is does what you want. If so, please remember to mark this Answer as Selected.

Discuss

Discussion

@john_ru  I saw that you answered, and will get to this when I can!  Have to do real work in meantime!
SusanUser (rep: 16) Nov 29, '23 at 10:30 am
Tried it yet, Susan? 
John_Ru (rep: 6142) Dec 1, '23 at 11:13 am
Well Susan- still too busy?
John_Ru (rep: 6142) Dec 5, '23 at 4:41 pm
Thanks for selecting my Answer, Susan.
John_Ru (rep: 6142) Jan 4, '24 at 12:16 pm
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login