Avatar of ndoorsinteractive
ndoorsinteractive asked on

Cannot run the macro "filename1". The macro may not be available in this workbook or all macros may be disabled.

I've working on Macro Function (by VBA) which is in Excel.

When I create macro function and register function directly on toolbar(ribbon?),
the macro doesn't have any problem to run.

but the problem is happing,
when i close file and excel completely, and i open new file with other name and try to run the macro by pressing macro button, it keeps showing error below.

Cannot run the macro "filename1". The macro may not be available in this workbook or all macros may be disabled.

i've enabled macro setting as "allow all macro enabled"..

what am i supposed to change or add it.?

Also, I need the macro button available for 1 or 2 users in Active directory as well.

Thanks in advance
VB ScriptMicrosoft ExcelVisual Basic Classic

Avatar of undefined
Last Comment
Argenti

8/22/2022 - Mon
SOLUTION
Argenti

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
ndoorsinteractive

Thanks for your comments.
I've registered personal.xlsd file in C:\Users\USERNAME\AppData\Roaming\Microsoft\Excel\XLSTART

Now, it starts automatically whenver excel opens.
but, I still get this error (attached file)
i'm not what problem is. is it problem on VBscript..?

Thanks
screen-capture.png
SOLUTION
Argenti

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
ndoorsinteractive

Is it problem beacause of inside VBscript code.?
I don't see any Book2.htm or .htm naming code inside of it.
hmm..
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
ndoorsinteractive

I've resolved it. I copied script and place into new module
that it works.

Thanks for your followup
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Argenti

You're welcome.