The following code always hangs up at this line with a message box telling me
always hangs up at this line with a message box telling me
with a message box telling me
Run-time error '13':
type mismatch
The preceding insertion of formulas in the range D4:G4 works fine. I am using VB to run this macro in Excel 97. The "ÁÙ´²" above are chinese words that my computer shows and deals with fine.
Code:
Sub ResetCMattenshts()
'
' Resetattenshts Macro
' Macro recorded 4/18/2013 by Yin Ju Ping
'
'
Sheets("LC1").Select
Range("D4:G4").Select
Selection.ClearContents
Range("D4").Select
Range("D4").Formula = "=D5"
Range("E4").Select
Range("E4").Formula = "=E5"
Range("F4").Select
Range("F4").Formula = "=F5"
Range("G4").Select
Range("G4").Formula = "=G5"
Range("D5:G5").Select
Selection.ClearContents
Range("D5").Select
Range("D5").Formula = "=INDEX(Schedule!R3:V20,MATCH(" * ÁÙ´²1 - 2 * ",Schedule!R3:R20,0),2)"
Range("E5").Select
Range("E5").Formula = "=INDEX(Schedule!R3:V20,MATCH(" * ÁÙ´²1 - 2 * ",Schedule!R3:R20,0),3)"
Range("F5").Select
Range("F5").Formula = "=INDEX(Schedule!R3:V20,MATCH(" * ÁÙ´²1 - 2 * ",Schedule!R3:R20,0),4)"
Range("G5").Select
Range("G5").Formula = "=INDEX(Schedule!R3:V20,MATCH(" * ÁÙ´²1 - 2 * ",Schedule!R3:R20,0),5)"
always hangs up at this line with a message box telling me
Code:
Range("D5").Formula = "=INDEX(Schedule!R3:V20,MATCH(" * ÁÙ´²1 - 2 * ",Schedule!R3:R20,0),2)"
Run-time error '13':
type mismatch
The preceding insertion of formulas in the range D4:G4 works fine. I am using VB to run this macro in Excel 97. The "ÁÙ´²" above are chinese words that my computer shows and deals with fine.