Compile Error Argument Not Optional Excel
Contents |
360 games PC games
Excel Vba Compile Error Argument Not Optional
Windows games Windows phone games Entertainment All Entertainment compile error argument not optional vb6 Movies & TV Music Business & Education Business Students & educators
Visual Basic Compile Error Argument Not Optional
Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet excel compile error method or data member not found Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Lumia All excel compile error sub or function not defined Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company
Excel Compile Error User-defined Type Not Defined
Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs excel compile error variable not defined Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers,
Excel Compile Error Can't Find Project Or Library
just like you, helping each other. Join them; it only takes a minute: Sign up Strange “Argument not optional” error in VBA up vote 13 down vote favorite Private Sub importClipboard_Click() Dim data As Collection data = https://support.microsoft.com/en-us/kb/165538 getClipboardData() ...do something... End Sub Function getClipboardData() As Collection ...do something... End Function I am getting an "Argument not optional" compile error on the line: data = getClipboardData() What am I doing wrong? There no arguments to the getClipboardData() function - so how can I be missing one? vba compiler-errors share|improve this question asked Jun 23 '09 at 14:15 jwoolard 2,49562534 add a comment| 3 Answers 3 active oldest votes up vote 26 down http://stackoverflow.com/questions/1032819/strange-argument-not-optional-error-in-vba vote accepted It's a bad error message, but your problem is a common one - you've got to put Set data = getClipboardData() as you're returning an object. share|improve this answer answered Jun 23 '09 at 14:22 Joel Goodwin 4,0641724 add a comment| up vote 0 down vote I know this is going to sound crazy, but it has happened to me before. Is it possible that you have declared another function with the same name? share|improve this answer answered Jun 23 '09 at 14:17 Ben Jones 764 add a comment| up vote 0 down vote Also, where (sometimes) I have copied a function, although I rename the function itself, and its calling line, sometimes I forget to rename the Return Parameter Assignment within the code. Then you get this "Argument not optional". share|improve this answer answered Jun 26 '14 at 13:42 Kenson Gurney 1 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged vba compiler-errors or ask your own question. asked 7
not optional If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: http://www.vbforums.com/showthread.php?473038-RESOLVED-compile-error-argument-not-optional click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 13 of 13 Thread: [RESOLVED] compile error: argument not optional Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Jun 8th, 2007,09:03 AM #1 loverman210 View Profile compile error View Forum Posts Thread Starter Junior Member Join Date Jun 2007 Posts 17 [RESOLVED] compile error: argument not optional Hello to everyone! I'm new to programming, and in fact I'm so new that I even need some help to start programming!! Using VB 6.0 this is the code: Private Sub Command1_Click() MsgBox ''hello'' End Sub that's all! then I run it and get the message: ''compile excel compile error error: argument not optional'' any help would be much appreciated! thanks in advance!! using WinXP Sp2 and Visual Basic 6 classic Reply With Quote Jun 8th, 2007,09:08 AM #2 Hack View Profile View Forum Posts Super Moderator Join Date Aug 2001 Location Searching for mendhak Posts 58,335 Re: compile error: argument not optional Welcome to the forums. Code: Private Sub Command1_Click() MsgBox "Hello" End Sub That works just fine. There has to be something else going on in your program. Does this error occur when you click the button or when you start your project? Please use [Code]your code goes in here[/Code] tags when posting code. When you have received an answer to your question, please mark it as resolved using the Thread Tools menu. Before posting your question, did you look here? Got a question on Linux? Visit our Linux sister site. I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section. Creating A Wizard In VB.NET Paging A Recordset What is wrong with using On Error Resume Next Good Article: Language Enhancements In Visual Basic 2010 Upgrading VB6 Code To VB.NET Microsoft MVP 2005/2006/2007/200