2

When i compile code in vba, it show message Compiler to large.

my code over 30 line as the following:

result = Application.WorksheetFunction.VLookup(dt, sheet2.Range("B11:E15"), 4, False)
sheet1.Range("E9").Value = result

Any solutions ?

Regards

Jam Dara
  • 239
  • 1
  • 5
  • 12
  • Yes i run it on low pc hardware. it has many line of code. – Jam Dara Jul 24 '13 at 05:48
  • 4
    Possible duplicate of this question: http://stackoverflow.com/questions/3751263/procedure-too-large – GTG Jul 24 '13 at 05:55
  • Please give the exact error message in its entirety. I doubt Microsoft misspelled their error message; usually it's "Procedure too large" Are you compiling on 32 bit or 64 bit computer? – D_Bester Jul 24 '13 at 06:12

1 Answers1

0

See this website http://support.microsoft.com/kb/983044 You need to break your code into smaller pieces to not exceed 64K. Also you need to write your code on 32 bit computer to guarantee compatibility.

D_Bester
  • 5,723
  • 5
  • 35
  • 77