Impossible?

raskinsm

New Member
Joined
Feb 10, 2020
Messages
17
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have posted this on 3 other forums and no one has responded. It seems like a doable request. Maybe a not-so-advanced user has an advanced scenario? It doesn't seem outlandish to insert a row once data is input.


I have a macro written on a specific sheet (not a module). What it does is when a selection is made in the dropdown in C2, it populates, in the adjacent cell, D2, another dropdown depending on the selection in C2.



This works perfectly.



However, this configuration will not allow me to insert a row, which pushes the data in Row 2 to Row 3.



Here is the code on the sheet.




VBA Code:
Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C:C")) Is Nothing Then
Select Case Target
Case "Home Expenses": CAT_HM
Case "Daily Living": CAT_DLE
Case "Children": CAT_CHLD
Case "Savings": CAT_SAV
Case "Obligations": CAT_OBLIG
Case "Entertainment": CAT_ENT
End Select
End If
End Sub

When I insert a row, I get MSVB error: Run-Time error '13': Type Mismatch





When I click Debug, it sends me here:











Any help would be epic, I have been struggling with this. I have also tried copying and pasting, cutting, deleting and pasting. Come on, do me a solid on this Friday.



Thanks

Marc



 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
I don't remember and I am not searching my history, I have too much going on. I will delete the post and never ever ever say that again.
What a pain in the as# - Delete my entire account. How stupid.
 
Upvote 0
If you continue to use a Worksheet_Change event, I'd suggest you need to turn off events first.
VBA Code:
Application.EnableEvents = False
and then turn back on at the end of the code.
Otherwise you will get caught in an infinite loop.


Also, the problem with cross posting without the links to the other sites, is that if someone else is working on the issue at another site, they, or us, may be wasting their time because it may already have been solved. Keep in mind we are all unpaid volunteers.
 
Upvote 0
If you continue to use a Worksheet_Change event, I'd suggest you need to turn off events first.
VBA Code:
Application.EnableEvents = False
and then turn back on at the end of the code.
Otherwise you will get caught in an infinite loop.


Also, the problem with cross posting without the links to the other sites, is that if someone else is working on the issue at another site, they, or us, may be wasting their time because it may already have been solved. Keep in mind we are all unpaid volunteers.
Thanks for the info and the recommendation. Initially, I googled one site and asked the question as a guest. Another I put in a request to cancel my account because their forum platform was very bad. I decided to use and stay with this one because there was responsiveness and the platform is quality. Now I know. I would have to comb through my history and or inbox and I just do not have the time. I will never go to or post to, those forums again.
 
Upvote 0
The best thing I can suggest then, is if you get a response back from either of those sites, you post the response back here so it can be noted in this thread, so others can refer to that site. (y):cool:
 
Upvote 0

Forum statistics

Threads
1,215,029
Messages
6,122,755
Members
449,094
Latest member
dsharae57

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top