Hello,
My first time registering and posting on the site so hello to everyone. Sorry in advance if this should go under a different section.
I have a piece of code that isn't cooperating in converting a VBA excel macro I have that is going into a VB.Net program. Essentially, the code searches for columns with a specific heading in Row 1 and deletes the entire column if the heading name is present.
Example of the VBA code:
I know that the first part that stood out to me as having an issue is the:
I've scoured google and forums but I don't see a possible translation for the LookIn and LookAt and I'm sure that whole piece of code in general isn't translating well at all.
This is literally the last piece of code I need to get working and it's driving me up a wall. I'll also mention I am quite the beginner at all of this so I'm sorry in advance for any lack of knowledge I may display
My first time registering and posting on the site so hello to everyone. Sorry in advance if this should go under a different section.
I have a piece of code that isn't cooperating in converting a VBA excel macro I have that is going into a VB.Net program. Essentially, the code searches for columns with a specific heading in Row 1 and deletes the entire column if the heading name is present.
Example of the VBA code:
VB.NET:
sToFind = "Column Heading Name1"
Do
Set rngFound = wstTarget.Rows(1).Find( _
What:=sToFind, _
LookIn:=xlValues, _
lookat:=xlWhole)
If rngFound Is Nothing Then
Exit Do
Else
rngFound.EntireColumn.Delete
End If
Loop
I know that the first part that stood out to me as having an issue is the:
VB.NET:
Set rngFound = wstTarget.Rows(1).Find( _
What:=sToFind, _
LookIn:=xlValues, _
lookat:=xlWhole)
I've scoured google and forums but I don't see a possible translation for the LookIn and LookAt and I'm sure that whole piece of code in general isn't translating well at all.
This is literally the last piece of code I need to get working and it's driving me up a wall. I'll also mention I am quite the beginner at all of this so I'm sorry in advance for any lack of knowledge I may display