Error 9 Subscript Out Of Range Excel 2007
Contents |
be down. Please try the request again. Your cache administrator is webmaster. Generated Mon, 10 Oct 2016 09:46:15 GMT by s_ac15 (squid/3.5.20)
Forum Microsoft Office Application Help - Excel Help forum Excel Programming / VBA / Macros [SOLVED] Runtime error 9 "subscript out of range" To get replies by our experts at nominal charges, follow
Runtime Error 9 Subscript Out Of Range Fix
this link to buy points and post your thread in our Commercial Services
Subscript Out Of Range In Vba
forum! Here is the FAQ for this forum. + Reply to Thread Results 1 to 9 of 9 Runtime error subscript out of range excel macro 9 "subscript out of range" Thread Tools Show Printable Version Subscribe to this Thread… Rate This Thread Current Rating Excellent Good Average Bad Terrible Display Linear Mode Switch http://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-mso_other/run-time-error-9-subscript-out-of-range-microsoft/f75f3b9d-60fe-4b84-8622-69bd279834bd to Hybrid Mode Switch to Threaded Mode 05-07-2012,05:26 PM #1 MyCousinVinnie View Profile View Forum Posts Registered User Join Date 05-07-2012 Location Rehoboth Beach, Delaware MS-Off Ver Excel 2007 Posts 5 Runtime error 9 "subscript out of range" Hello everyone! Problem:– runtime error 9, “subscript out of range” - everywhere! Given: Workbooks MEgdF.xls and MEgdB.xls. Task: Transfer input data and estimated data from MEgdF.xls to MEgdB.xls. http://www.excelforum.com/showthread.php?t=829614 Workbook MEgdF.xls Worksheet “Data&Parms”, Column H: Input data in cells 1 to 21 Worksheet “Output”, Column F: estimated data in cells 1 to 41. Workbook MEgdB.xls Worksheet “Data&Parms”, Column H: Estimated data from MegdF.xls read into cells 1 to 41 Worksheet “Output”, Column F: Input data from MegdF.xls read into cells 1 to 41. I am using Excel 2007 and I know nothing of Excel VBA whatsoever. Macros tried available upon request. Can anyone help? Best regards, “MyCousinVinnie Register To Reply 05-07-2012,08:42 PM #2 JBeaucaire View Profile View Forum Posts Visit Homepage @dministrator Join Date 03-21-2004 Location Bakersfield, CA MS-Off Ver 2010 Posts 31,624 Re: runtime error 9 "subscript out of range" That error translates into: "some object you tried to access by name cannot be found". So, your code tried to access a workbook in a folder it couldn't find. Or a sheet in a workbook it couldn't find, or something like that. Spelling always counts when addressing commands to objects. _________________ Microsoft MVP 2010 - Excel Visit: Jerry Beaucaire's Excel Files & Macros If you've been given good help, use the icon below to give reputation feedback, it is appreciated. Always put your code b
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings http://stackoverflow.com/questions/7518577/runtime-error-9-subscript-out-of-range and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation http://www.ozgrid.com/forum/showthread.php?t=172384 Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it subscript out only takes a minute: Sign up Runtime Error '9' Subscript out of range up vote 2 down vote favorite 1 I have a macro that needs to open a few excel files and copy data from those files and paste them into the macro file in a sheet named "Consolidated". The macro goes to a specified path, counts the number of subscript out of files in the folder and then loops through to open a file, copy the contents and then save and close the file. The macro runs perfectly on my system but not on the users systems. The error i am receiving during the looping process is "Runtime Error '9' Subscript out of range". The line on which this error pops up is Set wb = Workbooks.Open(Filename:=.FoundFiles(file_count)) At first i thought that the files might be opening slower than the code execution so i added wait time of 5 seconds before and after the above line...but to no avail. The code is listed below Sub grab_data() Application.ScreenUpdating = False Dim rng As Range srow = ThisWorkbook.Sheets("Consolidated Data").Cells(65536, 11).End(xlUp).Row 'Number of filled rows in column A of control Sheet ThisWorkbook.Sheets("Control Sheet").Activate rawfilepth = Sheets("Control Sheet").Cells(65536, 1).End(xlUp).Row 'Loop to find the number of excel files in the path in each row of the Control Sheet For folder_count = 2 To rawfilepth wkbpth = Sheets("Control Sheet").Cells(folder_count, 1).Value With Application.FileSearch .LookIn = wkbpth .FileType = msoFileTypeExcelWorkbooks .Execute filecnt = .FoundFiles.Count 'Loop to count the numb
Way | Trading Add-ins For Excel | Convert Excel Into Calculating Web Pages Excel Web Pages | Produce Clean Efficient VBA Code Every Time | Build Automated Trading Models In Excel | Excel Web Pages | Excel Video Training Forum New Posts FAQ Calendar Forum Actions Mark Forums Read Quick Links Today's Posts What's New? Advanced Search Forum HELP FORUMS Excel General Run-time error 9 (subscript out of range) when running macro to copy table Excel Training / Excel Dashboards Reports 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: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. If you don't like Google AdSense in the posts, register or log in above. Click here to view the relaunched Ozgrid newsletter. Results 1 to 5 of 5 Thread: Run-time error 9 (subscript out of range) when running macro to copy table Thread Tools Show Printable Version Search Thread Advanced Search December 1st, 2012 #1 Greta View Profile View Forum Posts I agreed to these rules Join Date 1st December 2012 Posts 2 Run-time error 9 (subscript out of range) when running macro to copy table Hello, I'm trying to create a macro in a "home" worksheet that will open another worksheet ("source"), copy its table of data (the # of rows in the table will vary, but the # of columns probably will not), and paste it in the home WS, and then close the source worksheet. The home WS will eventually be expanded to include manipulation of the data, but for now I can't get it to perform the simple operation in the previous sentence without the error message. Here's the VB code: VB: ' Macro1 Macro ' ' ActiveCell.Offset(4, 1).Range("A1").Select ChDir