Thursday, March 24, 2011

Adjusting Print Areas


Private Sub cmdMTDECCS_Click()

Sheets("Korea").Select
ActiveSheet.PageSetup.PrintArea = "E2537:L3794"

End Sub

Tuesday, March 22, 2011

#Value! Errors in User-Defined Functions

When creating user-defined functions, there are times when the #Value! errors occur. The possible causes for this is:
  1. Variables defined are not what is defined by the VBA code.
  2. The variables used to compute the result in the code is not usable as they are blanks or text.