• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Run time Error 91 - Code Error

Hi Friends,

Need your help in highlighting my error for the below code.

60797





Code:
'Define the variables in the sheet of the macros

Workbooks(wbmacro).Activate
Sheets(Acc).Visible = True
Sheets(Acc).Select

''Look in what row are the titles

Dim MRow As Integer: MRow = Cells.Find("MMS ID").Row 'Row of the macro where the titles are
RRow = RRow + 1
MRow = MRow + 1

60796
 

Marc L

Excel Ninja
Hi !​
Easy error : no match ‼ And never use the Range.Find method like that,​
just follow the example within the VBA inner help which no needs On Error Resume Next …​
Easier if you transform your data to an Excel table !​
As a table object already knows where are its headers row and data range …​
 

Marc L

Excel Ninja
A sample from many threads of this forum using Find method :​
 
Top