• /r/visualbasic
  • VB.NET error “Insufficient memory to continue the execution of the program”

    Hi, I’m running a listbox that is pulling data from an excel worksheet. This works by copying each line item to another sheet (that code works) and then pulling that value into the listbox. I get the insufficient memory error on the following line: lbxResults.Items.AddRange(GlobalVariables.oWb.Worksheets(“sheet2”).Range(“B1:B” & lastrow, “A1:U21”).Value) This is basically some modified vba code, […]

  • /r/visualbasic
  • VB.NET .Find method problem

    I’m running into a problem using the Range.Find method in VB.NET. Here is my code: With GlobalVariables.oWb.Worksheets(“Mastersheet”) GlobalVariables.oWb.Worksheets(“Mastersheet”).select rng = GlobalVariables.oExcel.Range(“L2:L750”) crange = rng.Find(What:=txtSearch.Text, LookIn:=GlobalVariables.oWb.xlValues, LookAt:=GlobalVariables.oWb.xlPart) firstaddress = crange.Address This is code pulled over from VBA. I’m getting an error in the line starting with “crange = “, with an error description of “Public member […]