View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
violet violet is offline
external usenet poster
 
Posts: 52
Default problem in executing macro once for multiple worksheet

Public Sub Workbook_Open()

Dim wkb As Workbook
Dim wks As Worksheet

Set wkb = ActiveWorkbook
For Each wks In wkb.Worksheets(Array("Koram", "Hong_Kong", "Korea",
"China", "Malaysia", "Brunei", "Indonesia", _
"Philippines", "Singapore", "Thailand", "Taiwan", "Vietnam", "HUB",
"India", "Sri_Lanka", "Bangladesh"))
Call sorting(wks)
Call SubTot(wks)
Call changes(wks)
Next wks
end sub

this code work well for changes(wks). when i add in the other 2, the macro
will not be apply to all required sheets but only apply to one sheet. what i
m lacking here?