Excel Runtime Error 9
Contents |
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 excel runtime error 9 subscript out of range Learn more about Stack Overflow the company Business Learn more about hiring developers or
Runtime Error 9 Excel Vba
posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow what does runtime error 9 mean Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up macro run-time error '9': subscript out of range macro run time error 13 up vote 1 down vote favorite I found a macro on the web to protect a worksheet with a password. It works fine, but when I save the file I get the message: run-time error '9': subscription out of range. I have never programmed or used visual basic before and could use some help . Thank you The macro is: Private Sub Workbook_BeforeClose(Cancel As Boolean) 'Step 1:Protect the
Excel Runtime Error 1004
sheet with a password Sheets("Sheet1").protect Password:="btfd" 'Step 2: Save the workbook ActiveWorkbook.Save End Sub excel excel-vba share|improve this question edited Feb 20 '14 at 22:07 simoco 26.7k93552 asked Feb 20 '14 at 22:06 user3334808 6112 add a comment| 3 Answers 3 active oldest votes up vote 2 down vote "Subscript out of range" indicates that you've tried to access an element from a collection that doesn't exist. Is there a "Sheet1" in your workbook? If not, you'll need to change that to the name of the worksheet you want to protect. share|improve this answer answered Feb 20 '14 at 22:10 The Dark Canuck 1367 add a comment| up vote 1 down vote Why are you using a macro? Excel has Password Protection built-in. When you select File/Save As... there should be a Tools button by the Save button, click it then "General Options" where you can enter a "Password to Open" and a "Password to Modify". share|improve this answer answered Feb 20 '14 at 22:21 Gordon Bell 7,7153257 add a comment| up vote 0 down vote When you get the error message, you have the option to click on "Debug": this will lead you to the line where the erro
360 games PC games excel 2007 runtime error Windows games Windows phone games Entertainment All Entertainment excel runtime error 5 Movies & TV Music Business & Education Business Students & educators
Excel Runtime Error 53
Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet http://stackoverflow.com/questions/21920697/macro-run-time-error-9-subscript-out-of-range 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 https://support.microsoft.com/en-us/kb/210663 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
'9' Subscript out of range EverydayVBA SubscribeSubscribedUnsubscribe762762 Loading... Loading... Working... Add to Want to watch this again later? Sign in to add this video to a playlist. Sign https://www.youtube.com/watch?v=AC3GgPOalLM in Share More Report Need to report the video? Sign in to report inappropriate content. Sign in Transcript Statistics 11,517 views 14 Like this video? Sign in to make your opinion count. Sign in 15 3 Don't like this video? Sign in to make your opinion count. Sign in 4 Loading... Loading... Transcript The interactive transcript could not be time error loaded. Loading... Loading... Rating is available when the video has been rented. This feature is not available right now. Please try again later. Published on Jan 29, 2016In this Excel VBA (Macro) Tutorial we review the rutime error 9.This error is caused when the index of an array and members of collections is outsie their defined range-~-~~-~~~-~~-~-Please watch: excel runtime error "Excel VBA Request a Video" https://www.youtube.com/watch?v=NO7Ew...-~-~~-~~~-~~-~- Category Education License Standard YouTube License Show more Show less Loading... Advertisement Autoplay When autoplay is enabled, a suggested video will automatically play next. Up next VBA Run-time Error '91' Object-variable or With block variable not set - Duration: 4:24. EverydayVBA 11,243 views 4:24 Excel Visual Basic (VBA) for Beginners - Part 1 of 4: Buttons and Macros - Duration: 6:49. Tiger Spreadsheet Solutions 98,975 views 6:49 Excel VBA Introduction Part 19 - Error Handling (On Error, Resume, GoTo) - Duration: 34:58. WiseOwlTutorials 34,585 views 34:58 Transfer Specific Worksheet Range Data from one worksheet to another based on condition - Duration: 18:11. Dinesh Kumar Takyar 59,512 views 18:11 VBA run-time error '1004' Application-defined or Object-defined error - Duration: 2:51. EverydayVBA 10,847 views 2:51 How fix Out Of Range Error / Kako resiti Out Of Range Error - Duration: 3:15. My PC Tutorials 13,409 views 3:15 Advanced Excel video Tutorial - Generating reports using MACROS - Duration: 23:00. xtremeExcel 92,568 views 23:00 Transfer data from one Excel worksheet to