मैं Excel 2010 के लिए VBA का उपयोग कर रहा है और बेतरतीब ढंग से निम्न त्रुटि प्राप्त:एक्सेल VBA रन-टाइम त्रुटि 1004
Run-time error '1004': "The sort reference is not valid. Make sure it's within the data you want to sort, and the first Sort By box isn't the same or blank."
इस कोड है
'Sort the active rows
With ActiveWorkbook.Worksheets("Product Backlog").Sort
.SetRange Range("A4:F51")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
सबसे संभावित कारण है कि आप नहीं कर रहे हैं आवश्यक वर्कशीट के भीतर। 'ActiveWorkbook' का उपयोग न करें,' शीट्स ("xxxxx") 'का उपयोग करें। –