Four ways to fix runtime error 1004 in Excel:
Workable Solutions | Step-by-step Troubleshooting |
---|---|
Fix 1. Delete the GWXL97.XLA Files | Fix the Excel error 1004 is to find and delete the error file. Go to C:Program FilesMS OfficeOfficeXLSTART…Full steps |
Fix 2. Check the Trust Access to the VBA Project Object Model | Enable a VBA project trust option in Excel Trust Center to fix Excel error 1004. Open a blank Excel file…Full steps |
Fix 3. Create Another Excel Template | Start a new Excel workbook and make sure there is only one worksheet in it. Format the workbook first…Full steps |
Fix 4. Repair Corrupted Excel File | Repair corrupted Excel files with a file recovery tool. EaseUS file repair tool fixes severely corrupted XLS and XLSX files and retrieves everything from Excel…Full steps |
Microsoft Visual Basic for Applications (VBA) is developed to help users write programs for the Windows operating system. It runs as an internal programming language in Microsoft Office, such as Word, Excel, and PowerPoint.
Some users have reported that when running VBA in an Excel chart or trying to generate a Macro in Excel documents, an error message popped up saying: Runtime error 1004. And then they find themselves cannot access the Excel files. If you have the same encounter as these users, this post is the right place for you. You can find both the reasons and the corresponding solutions of this error code on this page.
Runtime Error Details
The error message contains more information than the error code 1004. Generally, follow the error code, you can see a brief description. The most repeated error messages are listed below:
- Runtime error 1004: Application or object-defined error.
- Runtime error 1004: Method Ranger of Object Worksheet failed.
- Runtime error 1004: Copy Method of Worksheet Class failed.
The Reason Why You See Runtime Error 1004 in Excel
If you want to know how to fix runtime error 1004 in Excel properly, you need to understand what leads to this issue. The following are the most prominent reasons.
- Macro Name Error
The Macro you are running is copying the original worksheet to a workbook with a defined name that you did not save and close before running the Macro.
- File Conflict
When opening the VBA Excel file, it gets conflicted with other programs.
- Too Many Legend Entries
The Excel chart contains more legend entries than space available to display the legend entries on the chart.
- Excel File Corruption
Your .xls files got corrupted, infected, or damaged.
Although many reasons would cause this Excel error 1004 problem, luckily, some valid methods can help users re-access the files. Let’s check them one by one.
Fix 1. Delete the GWXL97.XLA Files to Fix Runtime Error 1004 in Excel
The easiest method to fix the Excel error 1004 is to find and delete the error file.
Step 1. Go to C:Program FilesMS OfficeOfficeXLSTART.
Step 2. Find GWXL97.XLA file and delete it.
Step 3. Reopen your Excel file and check if the problem is solved.
Fix 2. Check the Trust Access to the VBA Project Object Model
Another solution you can try is to enable a VBA project trust option in Excel Trust Center. Follow the detailed steps and have a try.
Step 1. Open a blank Excel file and click «Files» on the upper left.
Step 2. Click Option and go to Trust Center.
Step 3. Find and enter the Trust Center Settings.
Step 4. Under Macro Settings, tick the option of «Trust access to the VBA project object model.»
Now you can check your Excel file.
Fix 3. Create Another Excel Template to Fix Runtime Error 1004 in Excel
This method could be a little bit complicated, but it’s useful and worth trying.
Step 1. Please start a new Excel workbook and make sure there is only one worksheet in it.
Step 2. Format the workbook first and then put the data you need onto it.
Step 3. Tap File > Save As, first enter the file name, and click the unfold arrow in Save as Type column.
Excel 2003: Choose Excel 97-2003 Template.
Excel 2007 or Later: Choose Excel Template.
Step 4. Click «Save» to confirm.
Now you can insert it programmatically by using the following code: Add Type:=pathfilename. The file name is the one you set when you create the new Excel template.
Fix 4. Repair Corrupted Excel Files Due to Error 1004
If all the above solutions can’t help you out, then there is one possibility that the Excel file you want to open is damaged. To fix a damaged Excel file, you can rely on file repair software. EaseUS Data Recovery Wizard is a great choice.
With this tool, click the «Repair» button and wait for it to fix all the corrupted documents for you.
- Repair various corrupted files, including repairing Word, Excel, and PDF document
- Fix unreadable contents in Word efficiently
- Repair corrupted PDF files, extract the text, comments, labels, graphics, etc.
- Compatible with Microsoft Office 2019, 2016, 2013, 2010, & previous versions.
Download the software and follow the detailed steps below to fix corrupted Excel files.
Step 1. Launch EaseUS Data Recovery Wizard, and then scan disk with corrupted documents. This software enables you to fix damaged Word, Excel, PPT, and PDF files in same steps.
Step 2. EaseUS data recovery and repair tool will scan for all lost and corrupted files. You can find the target files by file type or type the file name in the search box.
Step 3. EaseUS Data Recovery Wizard can repair your damaged documents automatically. After file preview, you can click «Recover» to save the repaired Word, Excel, and PDF document files to a safe location.
The Bottom Line
After reading, you must have a thorough understanding of how to fix Runtime error 1004. If you can make sure that the Excel file you want to open is valid, then the first three methods would help you out.
Once you got a damaged Excel file, a professional file recovery tool is a wiser choice. EaseUS file repair software is highly recommended by many users & IT professionals to help you repair Word, Excel, PowerPoint, and PDF files.
Return to VBA Code Examples
In this Article
- VBA Error 1004 – Object does not exist
- VBA Error 1004 – Name Already Taken
- VBA Error 1004 – Incorrectly Referencing an Object
- VBA Error 1004 – Object Not Found
This tutorial will explain the VBA Error 1004- Application-Defined or Object-Defined Error.
VBA run-time error 1004 is known as an Application-Defined or Object-Defined error which occurs while the code is running. Making coding errors (See our Error Handling Guide) is an unavoidable aspect learning VBA but knowing why an error occurs helps you to avoid making errors in future coding.
VBA Error 1004 – Object does not exist
If we are referring to an object in our code such as a Range Name that has not been defined, then this error can occur as the VBA code will be unable to find the name.
Sub CopyRange()
Dim CopyFrom As Range
Dim CopyTo As Range
Set CopyFrom = Sheets(1).Range("CopyFrom")
Set CopyTo = Sheets(1).Range("CopyTo")
CopyFrom.Copy
CopyTo.PasteSpecial xlPasteValues
End Sub
The example above will copy the values from the named range “CopyFrom” to the named range “CopyTo” – on condition of course that these are existing named ranges! If they do not exist, then the Error 1004 will display.
The simplest way to avoid this error in the example above is to create the range names in the Excel workbook, or refer to the range in the traditional row and column format eg: Range(“A1:A10”).
VBA Error 1004 – Name Already Taken
The error can also occur if you are trying to rename an object to an object that already exists – for example if we are trying to rename Sheet1 but the name you are giving the sheet is already the name of another sheet.
Sub NameWorksheet()
ActiveSheet.Name = "Sheet2"
End Sub
If we already have a Sheet2, then the error will occur.
VBA Error 1004 – Incorrectly Referencing an Object
The error can also occur when you have incorrectly referenced an object in your code. For example:
Sub CopyRange()
Dim CopyFrom As Range
Dim CopyTo As Range
Set CopyFrom = Range("A1:A10")
Set CopyTo = Range("C1:C10")
Range(CopyFrom).Copy
Range(CopyTo).PasteSpecial xlPasteValues
End Sub
This will once again give us the Error 10004
Correct the code, and the error will no longer be shown.
Sub CopyRange()
Dim CopyFrom As Range
Dim CopyTo As Range
Set CopyFrom = Range("A1:A10")
Set CopyTo = Range("C1:C10")
CopyFrom.Copy
CopyTo.PasteSpecial xlPasteValues
End Sub
VBA Error 1004 – Object Not Found
This error can also occur when we are trying to open a workbook and the workbook is not found – the workbook in this instance being the object that is not found.
Sub OpenFile()
Dim wb As Workbook
Set wb = Workbooks.Open("C:DataTestFile.xlsx")
End Sub
Although the message will be different in the error box, the error is still 1004.
VBA Coding Made Easy
Stop searching for VBA code online. Learn more about AutoMacro — A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users!
Learn More!
VBA 1004 Error is a runtime error in VBA. It is also known as application-defined or object-defined error. Why is that? Because we have a limited number of columns in Excel. When our code gives the command to go out of range, we get a 1004 Error. There are other situations when we get this error when we refer to a range that does not exist in the sheet.
VBA Error 1004 in Excel
VBA 1004 Error is a run time error in VBA and occurs while running the code. Errors are part and parcel of the coding, especially when writing for the first time. Therefore, you may come across many errors in VBA. However, this is common for everybody, and there is no big deal about it.
However, knowing the error of why it is coming makes you avoid those mistakes in the coming future.
In this article, we will discuss one of the important errors in Excel, “VBA 1004 Error”.
Table of contents
- VBA Error 1004 in Excel
- Top 6 Excel VBA 1004 Runtime Errors
- #1 – VBA Run Time Error 1004: That Name is already taken. Try a different One:
- #2 – VBA Run Time Error 1004: Method “Range” of object’ _ Global’ failed:
- # 3 – VBA Run Time Error 1004: Select Method of Range class failed:
- #4 – VBA Runtime Error 1004 method open of object workbooks failed:
- #5 – VBA Runtime Error 1004 method Sorry We couldn’t Find:
- #6 – VBA Runtime Error 1004 Activate method range class failed:
- Recommended Articles
- Top 6 Excel VBA 1004 Runtime Errors
You are free to use this image on your website, templates, etc, Please provide us with an attribution linkArticle Link to be Hyperlinked
For eg:
Source: VBA 1004 Error (wallstreetmojo.com)
Top 6 Excel VBA 1004 Runtime Errors
You can download this VBA 1004 Error Template here – VBA 1004 Error Template
#1 – VBA Run Time Error 1004: That Name is already taken. Try a different One:
This error occurs while renaming the sheet.
If the worksheet’s name already exists. If you try to assign the same name to another sheet, VBA throws a “Run-time error ‘1004.’ ”
Look at the below code.
Code:
Sub Error1004_Example() Worksheets("Sheet2").Name = "Sheet1" End Sub
We are trying to rename sheet 2 as sheet 1. But, we already have a sheet named “Sheet1”.
If we run this code using the F5 key or manually, we will get “Run-time error ‘1004’ “: “That name is already taken. Try a different one.”
So, try renaming the sheet accordingly.
#2 – VBA Run Time Error 1004: Method “Range” of object’ _ Global’ failed:
It usually occurs when we try to access the named range in excelName range in Excel is a name given to a range for the future reference. To name a range, first select the range of data and then insert a table to the range, then put a name to the range from the name box on the left-hand side of the window.read more with a spelling mistake or that does not exist you are referring to.
For this, we have named the range of cells “Headings,” as shown in the below image.
Now, by using the RANGE object, we can access this range.
Code:
Sub Error1004_Example() Range("Headings").Select End Sub
If you run this code by pressing the F5 key, then this code will select the named range.
But, if we mention the named range wrongly, we will get “Run-time error ‘1004.’ “Method “Range” of object’ _ Global” failed.
Code:
Sub Error1004_Example() Range("Headngs").Select End Sub
Run this code manually or use the F5 key and see the result.
# 3 – VBA Run Time Error 1004: Select Method of Range class failed:
It usually occurs when we try to select the cells other than the active sheet without making the sheet select or active.
Look at the below code.
Code:
Sub Error1004_Example() Worksheets("Sheet1").Range("A1:A5").Select End Sub
The above code says to select the cells A1 to A5 in the worksheet “Sheet1”. However, to experiment, my present active sheet is “Sheet2”, not “Sheet1”.
We will run this code using the F5 key or manually to see what happens.
We got “Run-time error ‘1004.’ “Select method of Range class failed” as without activating the sheet; we try to select the cells of that sheet. So first, we need to activate the sheet before we select the cells. Below is the correct code.
#4 – VBA Runtime Error 1004 method open of object workbooks failed:
It usually occurs when you try to open the workbook, which has the same name as the other workbook we have already opened.
Look at the below code.
Code:
Sub Error1004_Example() Dim wb As Workbook Set wb = Workbooks.Open("FileName.xls", ReadOnly:=True, CorruptLoad:=xlExtractData) End Sub
It will throw the below error.
#5 – VBA Runtime Error 1004 method Sorry We couldn’t Find:
This error occurs when you try to open the file which does not exist in the mentioned path. For example, it could move, be renamed, or deleted from the mentioned path. One reason for this is the wrong type of path or file name with the excel extensionExcel extensions represent the file format. It helps the user to save different types of excel files in various formats. For instance, .xlsx is used for simple data, and XLSM is used to store the VBA code.read more.
Now, take a look at the below code.
Code:
Sub Error1004_Example() Workbooks.Open Filename:="E:Excel FilesInfographicsABC.xlsx" End Sub
This code says to open the file “ABC.xlsx” in the mentioned folder path.
We know there is no file in the mentioned folder path. So, we will get the: Run-time error ‘1004’ method when no file exists in the mentioned folder. Sorry, and We couldn’t find it.
#6 – VBA Runtime Error 1004 Activate method range class failed:
This error occurs mainly due to activating the range of cells without activating the worksheet.
Look at the below code.
Code:
Sub Error1004_Example() Worksheets("Sheet1").Range("A1:A5").Activate End Sub
This error is similar to the one we have seen in Run-time error’ 1004′: Select method of Range class failed.
If we run manually or use the F5 key, we will get the below error.
Because without activating the sheet, we cannot activate the cells in it. So first, activate the sheet and then activate the cells of that sheet.
Recommended Articles
This article has been a guide to VBA 1004 Error. Here, we discuss the top 6 types of 1004 run-time errors in VBA and how to fix them, along with examples and downloadable templates. Below are some useful articles related to VBA: –
- VBA LEN Function
- VBA Type Mismatch Error
- VBA Sub Procedures
- VBA Match Function
Summary:
In this post, I have included the complete information about Excel runtime error 1004. Besides that I have presented some best fixes to resolve runtime error 1004 effortlessly.
To fix Runtime Error 1004 in Excel you can take initiatives like uninstalling Microsoft Work, creating a new Excel template, or deleting The “GWXL97.XLA” File. If you don’t have any idea on how to apply these methods then go through this post.
Here in this article, we are going to discuss different types of VBA runtime error 1004 in Excel along with their fixes.
What Is Runtime Error 1004 In VBA Excel?
Excel error 1004 is one such annoying runtime error that mainly encounters while working with the Excel file. Or while trying to generate a Macro in Excel document and as a result, you are unable to do anything in your workbook.
This error may cause serious trouble while you are working with Visual Basic Applications and can crash your program or your system or in some cases, it freezes for some time. This error is faced by any versions of MS Excel such as Excel 2007/2010/2013/2016/2019 as well.
To recover lost Excel data, we recommend this tool:
This software will prevent Excel workbook data such as BI data, financial reports & other analytical information from corruption and data loss. With this software you can rebuild corrupt Excel files and restore every single visual representation & dataset to its original, intact state in 3 easy steps:
- Download Excel File Repair Tool rated Excellent by Softpedia, Softonic & CNET.
- Select the corrupt Excel file (XLS, XLSX) & click Repair to initiate the repair process.
- Preview the repaired files and click Save File to save the files at desired location.
Error Detail:
Error Code: run-time error 1004
Description: Application or object-defined error
Screenshot Of The Error:
Don’t worry you can fix this Microsoft Visual Basic runtime error 1004, just by following the steps mentioned in this post. But before approaching the fixes section catch more information regarding runtime error 1004.
Excel VBA Run Time Error 1004 Along With The Fixes
The lists of error messages associated with this Excel error 1004 are:
- VB: run-time error ‘1004’: Application-defined or object-defined error
- Excel VBA Runtime error 1004 “Select method of Range class failed”
- runtime error 1004 method range of object _global failed visual basic
- Excel macro “Run-time error ‘1004″
- Runtime error 1004 method open of object workbooks failed
- Run time error ‘1004’: Method ‘Ranger’ of Object’ Worksheet’ Failed
- Save As VBA run time Error 1004: Application defined or object defined error
Let’s discuss each of them one by one…!
#1 – VBA Run Time Error 1004: That Name is already taken. Try a different One
This VBA Run Time Error 1004 in Excel mainly occurs at the time of renaming the sheet.
If a worksheet with the same name already exists but still you are assigning that name to some other worksheet. In that case, VBA will throw the run time error 1004 along with the message: “The Name is Already Taken. Try a different one.”
Solution: You can fix this error code by renaming your Excel sheet.
#2 – VBA Run Time Error 1004: Method “Range” of object’ _ Global’ failed
This VBA error code mainly occurs when someone tries to access the object range with wrong spelling or which doesn’t exist in the worksheet.
Suppose, you have named the cells range as “Headings,” but if you incorrectly mention the named range then obviously you will get the Run Time Error 1004: Method “Range” of object’ _ Global’ failed error.
Solution: So before running the code properly check the name of the range.
# 3 – VBA Run Time Error 1004: Select Method of Range class failed
This error code occurs when someone tries to choose the cells from a non-active sheet.
Let’s understand with this an example:
Suppose you have selected cells from A1 to A5 from the Sheet1 worksheet. Whereas, your present active worksheet is Sheet2.
At that time it’s obvious to encounter Run Time Error 1004: Select Method of Range class failed.
Solution: To fix this, you need to activate the worksheet before selecting cells of it.
#4 – VBA Runtime Error 1004 method open of object workbooks failed
This specific run time Error 1004 arises when someone tries to open an Excel workbook having the same workbook name that is already open.
In that case, it’s quite common to encounter VBA Runtime Error 1004 method open of object workbooks failed.
Solution: Well to fix this, first of all close the already opened documents having a similar name.
#5 – VBA Runtime Error 1004 Method Sorry We Couldn’t Find:
The main reason behind the occurrence of this VBA error in Excel is due to renaming, shifting, or deletion of the mentioned path.
The reason behind this can be the wrong assigned path or file name with extension.
When your assigned code fails to fetch a file within your mentioned folder path. Then you will definitely get the runtime Error 1004 method. Sorry, and We couldn’t find it.
Solution: make a proper check across the given path or file name.
#6 – VBA Runtime Error 1004 Activate method range class failed
Behind this error, the reason can be activating the cells range without activating the Excel worksheet.
This specific error is quite very similar to the one which we have already discussed above i.e Run Time Error 1004: Select Method of Range class failed.
Solution: To fix this, you need to activate your excel sheet first and then activate the sheet cells. However, it is not possible to activate the cell of a sheet without activating the worksheet.
Why This Visual Basic Runtime Error 1004 Occurs?
Follow the reasons behind getting the run time error 1004:
- Due to corruption in the desktop icon for MS Excel.
- Conflict with other programs while opening VBA Excel file.
- When filtered data is copied and then pasted into MS Office Excel workbook.
- Due to application or object-defined error.
- A range value is set programmatically with a collection of large strings.
Well, these are common reasons behind getting the VBA runtime error 1004, now know how to fix it. Here we have described both the manual as well as automatic solution to fix the run time error 1004 in Excel 2016 and 2013. In case you are not able to fix the error manually then make use of the automatic MS Excel Repair Tool to fix the error automatically.
Follow the steps given below to fix Excel run time error 1004 :
1: Uninstall Microsoft Work
2: Create New Excel Template
3: Delete The “GWXL97.XLA” File
Method 1: Uninstall Microsoft Work
1. Go to the Task Manager and stop the entire running programs.
2. Then go to Start menu > and select Control Panel.
3. Next, in the Control Panel select Add or Remove Program.
4. Here, you will get the list of programs that are currently installed on your PC, and then from the list select Microsoft Work.
5. And click on uninstall to remove it from the PC.
It is also important to scan your system for viruses or malware, as this corrupts the files and important documents. You can make use of the best antivirus program to remove malware and also get rid of the runtime error 1004.
Method 2: Create New Excel Template
Another very simple method to fix Excel runtime error 1004 is by putting a new Excel worksheet file within a template. Instead of copying or duplicating the existing worksheet.
Here is the complete step on how to perform this task.
1.Start your Excel application.
2. Make a fresh new Excel workbook, after then delete the entire sheets present on it leaving only a single one.
3. Now format the workbook as per your need or like the way you want to design in your default template.
4. Excel 2003 user: Tap to the File>Save As option
OR Excel 2007 or latest versions: Tap to the Microsoft Office button after then hit the Save As option.
5. Now in the field of File name, assign name for your template.
6. On the side of Save as type there is a small arrow key, make a tap on it. From the opened drop menu
- Excel 2003 users have to choose the Excel Template (.xlt)
- And Excel 2007 or later version have to choose the Excel Template (.xltx)
7. Tap to the Save.
8. After the successful creation of the template, now you can programmatically insert it by making use of the following code:
Add Type:=pathfilename
Remarks:
From the above code, you have to replace the pathfilename with the complete path including the file name. For assigning the exact location of the sheet template you have just created.
Method 3: Delete The “GWXL97.XLA” File
Follow another manual method to fix Excel Runtime Error 1004:
1. Right-click on the start menu.
2. Then select the Explore option.
3. Then open the following directory – C:Program FilesMSOfficeOfficeXLSTART
4. Here you need to delete “GWXL97.XLA” file
5. And open the Excel after closing the explorer
You would find that the program is running fine without a runtime error. But if you are still facing the error then make use of the automatic MS Excel Repair Tool, to fix the error easily.
Automatic Solution: MS Excel Repair Tool
MS Excel Repair Tool is a professional recommended solution to easily repair both .xls and .xlsx file. It supports several files in one repair cycle. It is a unique tool that can repair multiple corrupted Excel files at one time and also recover everything included charts, cell comments, worksheet properties, and other data. This can recover the corrupt Excel file to a new blank file. It is extremely easy to use and supports both Windows as well as Mac operating systems.
* Free version of the product only previews recoverable data.
Steps to Utilize MS Excel Repair Tool:
Conclusion:
Hope this article helps you to repair the runtime error 1004 in Excel and recovers Excel file data. In this article, we have provided a manual as well as automatic solution to get rid of Excel run-time error 1004. You can make use of any solution according to your desire.
Good Luck!!!
Priyanka is an entrepreneur & content marketing expert. She writes tech blogs and has expertise in MS Office, Excel, and other tech subjects. Her distinctive art of presenting tech information in the easy-to-understand language is very impressive. When not writing, she loves unplanned travels.
Возникает при переходе по ссылке из одного листа на другой |
|
Сергей Пользователь Сообщений: 11251 |
Юрий я не рунописец но пока начинаю это читать
Прикладывайте примеры Лень двигатель прогресса, доказано!!! |
||
Юрий М Модератор Сообщений: 60574 Контакты см. в профиле |
Юрий, я подправил название темы: так больше конкретики. Ведь с Вашим названием все вопросы по ошибкам можно смело задавать в Вашей теме. Так лучше? Ну почему бы самому не придумать нормальное название? |
Сергей Пользователь Сообщений: 11251 |
Юрий Глодовский, я почему говорю про пример и почему так быстро привел описание ошибки, потому что ща сам сижу втыкаю в неё, так ка записал макрорекодером макрос попытался его усовершенствовать и мне выдает такую фигню и я не думаю что мы с вами делаем одно и тоже Лень двигатель прогресса, доказано!!! |
Сергей, пример приложить не могу, так как там у меня вся рабочая база. Пробовал вынести это дело в отдельный файл, но ошибка не возникает, походу это конфликт макросов. |
|
Юрий М Модератор Сообщений: 60574 Контакты см. в профиле |
Начните с того, что прогоните код пошагово: для начала выясним — на какой строке и в какой процедуре возникает эта ошибка. |
Сергей Пользователь Сообщений: 11251 |
#7 16.05.2014 22:53:10
это не ко мне, сам тупил над такой же ошибкой около 30 минут, грохнул макрос рисую заново, но это чисто развлекуха под пиво к работе у меня ни как не относится Лень двигатель прогресса, доказано!!! |
||
Юрий Глодовский Пользователь Сообщений: 137 |
#8 16.05.2014 23:42:20 Юрий М, в третьей строке, тот что If Not Intersect…
|
||
Сергей Пользователь Сообщений: 11251 |
#9 16.05.2014 23:44:38
Юрий Глодовский, обращайте внимание на советы, если не знаете как это сделать, спрашивайте, дадут либо ссылку либо совет как это сделать, КОТ хоть и сидит со скелетом но форумчан редко ест Лень двигатель прогресса, доказано!!! |
||
Hugo Пользователь Сообщений: 23250 |
#10 16.05.2014 23:46:23 У меня нет ошибки.
кто его знает…
Изменено: Hugo — 17.05.2014 08:31:16 |
||||
Юрий М Модератор Сообщений: 60574 Контакты см. в профиле |
Без файла сложно, конечно… Лист «База» есть? |
Hugo Пользователь Сообщений: 23250 |
Юра, у меня листа База не было. В начале |
Сергей Пользователь Сообщений: 11251 |
вообще не уверен но со своей ошибкой кажись разобрался я когда писал рекодером копировал формулы из одного документа в другой, когда они оба были открыты макрос работал, после того как я закрыл файл из которого копировал формулы начал запускать макрос начала вылетать эта ошибка Лень двигатель прогресса, доказано!!! |
Юрий Глодовский Пользователь Сообщений: 137 |
#14 17.05.2014 00:00:16
Этот вариант помог. Большое спасибо. |
||
Юрий М Модератор Сообщений: 60574 Контакты см. в профиле |
#15 17.05.2014 00:02:43 Немного смущает несоответствие комментария и строки кода. Комментарий ошибку не вызовет, но всё же:
А проверяем столбец С. |
||
Сергей Пользователь Сообщений: 11251 |
#16 17.05.2014 00:13:50
в будущем может, на данном моменте эволюции понимания в VBA у меня даже таких строк нет Лень двигатель прогресса, доказано!!! |
||
Казанский Пользователь Сообщений: 8839 |
#17 17.05.2014 01:13:52 Замечу, что Target.Parent это Sh, который передается в процедуру.
|
||