Thread: Nested if in VB
View Single Post
  #1 (permalink)  
Old October 2nd, 2009, 05:41 AM
Wenggo Wenggo is offline
Authorized User
 
Join Date: Mar 2006
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default Nested if in VB

Morning bro and sis, How should I code, to copy base on current month....anybody ?

Regards...


Sub Transform()

----> Proceed this statement when month = October
Sheets("Chart 2009").Select
Range("H35:H38").Select
Selection.Copy
Sheets("Year 2009").Select
Range("K4:K7").Select
ActiveSheet.Paste

---> Proceed this statement when month = November
Sheets("Chart 2009").Select
Range("J35:J38").Select
Selection.Copy
Sheets("Year 2009").Select
Range("L4:L7").Select
ActiveSheet.Paste

---> Proceed this statement when month = December
Sheets("Chart 2009").Select
Range("H35:H38").Select
Selection.Copy
Sheets("Year 2009").Select
Range("M4:M7").Select
ActiveSheet.Paste

End Sub
Reply With Quote