When I press the shortcut at second time, there is no run-time error 1004 prompt. Then I record a macro with a keyboard shortcut like figure below:Īpplication.Run "ATPVBAEN.XLAM!Histogram", ActiveSheet.Range("$A$1:$A$10") _ Is this faulty in some way?Īccording to your description, an error occurred when you ran the macro at second time. In the project window of the editor, the top project is "atpvbaen.xls (ATPVBAEN.XLAM)". What is the difference between ATPVBAEN.XLAM and atpvbaen.xls? In the VBA editor I have checked the Tools - Reference - atpvbaen.xls. I have both the "Analysis ToolPak" (ANALYS32.XLL) and "Analysis ToolPak - VBA" (ATPVBAEN.XLAM) Add-Ins active. I want to run several histograms on multiple ranges of data. I have to close and reopen the file to be able to run it again. The macro may not be available in this workbook or all macros may be disabled. When I run it, by pressing my short-cut Shift+Ctrl+H, it runs OK once.īut when I press the short-cut the second time, I get run-time error 1004, Cannot run the macro ". I want to generate a Histogram from Excel VBA.Īpplication.Run "Histogram", ActiveSheet.Range("$B$2:$B$200"), ActiveSheet.Range("$L$3"), ActiveSheet.Range("$G$7:$G$30"), False, False, False, False
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |