Compile Error Expected End Sub
Contents |
soon) Ruby (coming soon) Getting Started Code Samples Resources Patterns and Practices App Registration Tool Events Podcasts Training API Sandbox Videos Documentation Office Add-ins Office Add-in Availability Office compile error expected end sub excel Add-ins Changelog Microsoft Graph API Office 365 Connectors Office 365 REST APIs compile error in hidden module SharePoint Add-ins Office UI Fabric Submit to the Office Store All Documentation https://www.yammer.com/ http://feeds.feedburner.com/office/fmNx Office VBA language reference Visual compile error ambiguous name detected Basic language reference Error Messages Error Messages Expected End Sub Expected End Sub Expected End Sub #Else clause must be preceded by a matching #If #Else If, #Else, or #End If
Compile Error Expected End Of Statement
must be preceded by a matching #If #ElseIf must be preceded by a matching #If or #ElseIf and followed by an #ElseIf, #Else, or #End If
be down. Please try the request again. Your cache administrator is webmaster. Generated Thu, 06 Oct 2016 00:26:48 GMT by s_hv987 (squid/3.5.20)
+ Ask a Question Need help? Post your question and get tips & solutions from a community https://bytes.com/topic/visual-basic/answers/907558-how-fix-compile-error-expected-end-sub-vba-macro of 418,469 IT Pros & Developers. It's quick & easy. How to fix "Compile error: Expected End Sub" in VBA Macro? P: 1 Dorota Prywata Hi, I need help with VBA Macro for Auto-filter to high lite a header plp advice as per below course a I got Compile error: Expected End Sub ? Expand|Select|Wrap|Line Numbers SubMacro1() FunctionFilterOn(myCellAsRange)AsBoolean OnErrorResumeNext WithmyCell.Parent.AutoFilter With.Filters(myCell.Column-.Range.Column+1) compile error If.OnThenFilterOn=True EndWith EndWith EndFunction EndSub Thanks, D Feb 3 '11 #1 Post Reply Share this Question 1 Reply Expert Mod 2.5K+ P: 2,543 Stewart Ross You can't define a function (lines 3-10) WITHIN the definition of a SUB (lines 1 and 12). You can CALL the function from the sub, but they must be separately defined. -Stewart Feb 3 '11 #2 reply error expected end Message Cancel Changes Post your reply Join Now >> Sign in to post your reply or Sign up for a free account. Similar topics How to fix "Compile Error Expected: end of statement" in a query? How to fix error when executing macro: "Compile Error Variable not defined"? Delete Record Button and Getting a "compile error" Right turns to RIGHT and I get "Compile Error -Expected Array "on error resume next" does not work! "instantiated from here" compile error when using template "Use of possibly unassigned field" compile error What would cause"Compile error in hidden module" docmd.RunSQL Update records in table how can I get rid of the "You are about to update" message Browse more Visual Basic 4 / 5 / 6 Questions on Bytes Question stats viewed: 8200 replies: 1 date asked: Feb 3 '11 Follow this discussion BYTES.COM © 2016 Formerly "TheScripts.com" from 2005-2008 About Bytes | Advertise on Bytes | Contact Us Sitemap | Visual Basic 4 / 5 / 6 Answers Sitemap | Visual Basic 4 / 5 / 6 Insights Sitemap Follow us to get the Latest Bytes Updates