Concatenating Variables Into String to be Set to a Range in VBA
问题 I am having a problem with a particular line of code: ActiveSheet.Range("A" & rowCount & ":" & Mid(alphabet, totHdrLngth, 1) & belowRowCount) Where alphabet is a string containing uppercase letters A to Z. I keep getting the following error: Run-time error '5': Invalid Procedure call or argument I tried creating a String "inRange" and changing the code to this: inRange = "A" & rowCount & ":" & Mid(alphabet, totHdrLngth, 1) & belowRowCount curRange = ActiveSheet.Range(inRange) But that did not