TheWildAfrican
Board Regular
- Joined
- Apr 23, 2013
- Messages
- 70
Hello,
I was wondering if the Application.Worksheetfunction.Mid works within VBA in Excel 2010 . Everytime I execute the macro, it runs a "run-time error 438: Object doesn't support this property or method".
I'm trying to use the "Mid" Excel function to out a piece of text from the middle of a text entry. Please find my code below and advise. Thanks for your help!!
Dim mid_start, mid_end, cnt_columns, i As Integer
Dim pay_status As String
Range("R205").Activate
i = 0
While (ActiveCell.Offset(i, 0).Value = pay_status)
pay_status = ActiveCell.Offset(i, 0).Value
ActiveCell.Offset(i, 21).Value = Application.WorksheetFunction.Mid((ActiveCell.Offset(i, 0).Value), _ ActiveCell.Offset(i - 3, 21).Value, 1)
I was wondering if the Application.Worksheetfunction.Mid works within VBA in Excel 2010 . Everytime I execute the macro, it runs a "run-time error 438: Object doesn't support this property or method".
I'm trying to use the "Mid" Excel function to out a piece of text from the middle of a text entry. Please find my code below and advise. Thanks for your help!!
Dim mid_start, mid_end, cnt_columns, i As Integer
Dim pay_status As String
Range("R205").Activate
i = 0
While (ActiveCell.Offset(i, 0).Value = pay_status)
pay_status = ActiveCell.Offset(i, 0).Value
ActiveCell.Offset(i, 21).Value = Application.WorksheetFunction.Mid((ActiveCell.Offset(i, 0).Value), _ ActiveCell.Offset(i - 3, 21).Value, 1)