Hi All,
I am getting run time error 13 (type mismatch) while running below code. can you help me how to solve it
Also, how can I move entire record to Archive sheet when date in column O is entered.
HTML Code:
Hi All,
I am getting run time error 13 (type mismatch) while running below code. can you help me how to solve it
Also, how can I move entire record to Archive sheet when date in column O is entered.
HTML Code:
Sarat47,
To fix the type mismatch error, you'll have to change the sheet names to match the ones in your workbook because there is no sht1 in your workbook. You'll also have to but the sheet name in quotes. Per your attached workbook
this
BecomesPlease Login or Register to view this content.
*Change the sheet name to the one you want.Please Login or Register to view this content.
**Just looked at the code again, I see you in fact named sht1 Master Sheet. I'll have to look at it again.
Last edited by gmr4evr1; 06-19-2018 at 12:07 PM. Reason: Added *
1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.
Tom
Thanks gmr for your help.
I have assigned it in the code. But why is it not working.
sht1 = "Master sheet"
PHP Code:
Sub Demo1()
With Sheet2.Cells(1).CurrentRegion
If Application.CountA(.Columns(15)) > 1 Then
Application.ScreenUpdating = False
.Columns(15).AutoFilter 1, ">0"
With .Offset(1).Resize(.Rows.Count - 1)
.Copy Sheet1.Cells(Sheet1.UsedRange.Rows.Count + 1, 1)
.Delete xlShiftUp
End With
.AutoFilter
Application.ScreenUpdating = True
End If
End With
End Sub
Do you like it ? So thanks to click on bottom left star icon « ★ Add Reputation » !
Or via a worksheet event, paste this code to the Sheet2 (Master sheet) module :
PHP Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count = 1 And Target.Column = 15 And Target.Row > 1 And Target.Value > 0 Then
Application.EnableEvents = False
With Me.UsedRange.Rows(Target.Row)
.Copy Sheet1.Cells(Sheet1.UsedRange.Rows.Count + 1, 1)
.Delete xlShiftUp
End With
Application.EnableEvents = True
End If
End Sub
Do you like it ? So thanks to click on bottom left star icon « ★ Add Reputation » !
Thanks Marc.
Could you please check why I am getting run time error 13 (type mismatch) for first program.
I think this line
should bePlease Login or Register to view this content.
Although when I tried it, the error just moved to a different linePlease Login or Register to view this content.
Based on your suggestion, I change to sheet1 but still the program is not working. can you please help me.
Please Login or Register to view this content.
Hello Expert!!
Can anybody help me whether the code can be modified in any alternative way.
HTML Code:
What part isn't working? I made the changes I suggested to your attached workbook and it worked.Based on your suggestion, I change to sheet1 but still the program is not working. can you please help me.
Did you try Marc's suggested.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks