I need a simple loop statement that will go through each worksheet in a workbook and then take certain values from that worksheet. Then it is going to run some other subs using the variables. Below is what I have. I believe I am doing something wrong with ActiveSheet part of it.
For Each sht In Sheets
If sht.name <> "Scripts" Then
Dim userid As String
Dim name As String
Dim defaultorg As String
userid = ActiveSheet.Range("C11").Value
name = ActiveSheet.Range("A11").Value
defaultorg = ActiveSheet.Range("E11").Value
CreateUser
CreateRoles
End If
Next
Thanks in advance for the help.
Matt
For Each sht In Sheets
If sht.name <> "Scripts" Then
Dim userid As String
Dim name As String
Dim defaultorg As String
userid = ActiveSheet.Range("C11").Value
name = ActiveSheet.Range("A11").Value
defaultorg = ActiveSheet.Range("E11").Value
CreateUser
CreateRoles
End If
Next
Thanks in advance for the help.
Matt