I"m trying to lớn adopt the solution from this post và I"ve sầu modified the macro slightly (I only need lớn add on button click) so that it"s now

Sub AdjustValue() Dyên btnName As String Dyên ổn targetCell As String Dyên addAmount As Integer btnName = Application.Caller targetCell = Mid(btnName, 5, Len(btnName)) addAmount = 1 ActiveSheet.Range(targetCell).Value = ActiveSheet.Range(targetCell).Value + addAmountEnd Subwhen I cliông xã my button, named "Add_B3" it causes an error

The Macro May Not Be Available In This Workbook Or All Macros May Be Disabled

I"ve sầu saved the macro khổng lồ both the sheet that I"m working in & ThisWorkbook.

Bạn đang xem: The macro may not be available in this workbook or all macros may be disabled

*

I have phối my Macro Settings in the Trust Center lớn "Disable all macros with notification" but even if I select "Enable all macros" I still hit the error and I can"t work out why?


microsoft-excel microsoft-excel-2010 vcha macros
Share
Improve sầu this question
Follow
edited Mar 20 "17 at 10:16
*

CommunityBot
1
asked Feb 11 "16 at 16:39
*

Alex SAlex S
17922 gold badges22 silver badges1313 bronze badges
3
Add a comment |

1 Answer 1


Active sầu Oldest Votes
4
It looks like the button became unassigned from the macro. Try reassigning the button to lớn the macro.

When you first right cliông xã on the button và choose Assign Macro, if you look at the "Macro name" text box, it should show you what macro is currently assigned to the button.


Share
Improve sầu this answer
Follow
answered Feb 12 "16 at 3:26
*

bdr9bdr9
2,57833 gold badges20trăng tròn silver badges3737 bronze badges
Add a bình luận |

Your Answer


Thanks for contributing an answer to lớn Super User!

Please be sure khổng lồ answer the question. Provide details và nói qua your research!

But avoid

Asking for help, clarification, or responding lớn other answers.Making statements based on opinion; bachồng them up with references or personal experience.

To learn more, see our tips on writing great answers.

Xem thêm: Lời Bài Hát Nơi Ấy Con Tìm Về Lyric, Lời Bài Hát Nơi Ấy Con Tìm Về


Draft saved
Draft discarded

Sign up or log in


Sign up using Google
Sign up using Facebook
Sign up using E-Mail và Password
Submit

Post as a guest


Name
Email Required, but never shown


Post as a guest


Name
Email

Required, but never shown


Post Your Answer Discard

By clicking “Post Your Answer”, you agree khổng lồ our terms of service, privacy policy và cookie policy


Not the answer you're looking for? Browse other questions tagged microsoft-excel microsoft-excel-2010 vcha macros or ask your own question.


The Overflow Blog
Featured on Meta
Linked
4
Add/Subtract button Excel VBA
Related
4
Get Excel 2007 lớn cthua trận completely after creating a macro in the personal macro workbook
9
How vị I get a macro khổng lồ run in Outlook 2010?
2
Use Excel 2010 macro in some (not all) xlsx workbooks
1
Macro does not run when opening a File/Workbook from within Excel
0
Run Macro across all Tabs in Excel File - One line macro code available?
0
Excel macro stopped working after Windows update kb4103729
Hot Network Questions more hot questions

Question feed
Subscribe to lớn RSS
Question feed To subscribe khổng lồ this RSS feed, copy và paste this URL inlớn your RSS reader.


*

lang-vb
Super User
Company
Staông xã Exchange Network
site kiến thiết / logo © 2021 Staông chồng Exchange Inc; user contributions licensed under cc by-sa. rev2021.11.10.40714


Super User works best with JavaScript enabled
*

Your privacy

By clicking “Accept all cookies”, you agree Stachồng Exchange can store cookies on your device and discthảm bại information in accordance with our Cookie Policy.