How can I fix the error "Method 'range of object'_Worksheet' failed

0282 0 Reputation points
2024-12-16T20:46:29.3866667+00:00

I keep getting this error "Method 'range of object'_Worksheet' failed while debugging this code

Is there anyone knows how to fix this?

If Dir(Sheet2.Range("D" & [Product_ID] + 1).Value, vbDirectory) <> "" Then
Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
5,430 questions
Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
2,065 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,129 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.