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
SOLUTION
Avatar of Argenti
Argenti
Flag of France image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of ndoorsinteractive
ndoorsinteractive

ASKER

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
Avatar of Argenti
Argenti
Flag of France image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of ndoorsinteractive

ASKER

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
Avatar of Argenti
Argenti
Flag of France image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of ndoorsinteractive

ASKER

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

Thanks for your followup
Avatar of Argenti
Argenti
Flag of France image

You're welcome.
Visual Basic Classic
Visual Basic Classic

Visual Basic is Microsoft’s event-driven programming language and integrated development environment (IDE) for its Component Object Model (COM) programming model. It is relatively easy to learn and use because of its graphical development features and BASIC heritage. It has been replaced with VB.NET, and is very similar to VBA (Visual Basic for Applications), the programming language for the Microsoft Office product line.

165K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo