Click here to Skip to main content
15,890,825 members
Home / Discussions / Visual Basic
   

Visual Basic

 
SuggestionRe: Pads Layout VB script Pin
ZurdoDev21-Sep-16 3:26
professionalZurdoDev21-Sep-16 3:26 
QuestionVB - Looping Pin
Jughead320-Sep-16 10:04
Jughead320-Sep-16 10:04 
AnswerRe: VB - Looping Pin
ZurdoDev21-Sep-16 3:25
professionalZurdoDev21-Sep-16 3:25 
GeneralRe: VB - Looping Pin
Jughead321-Sep-16 4:53
Jughead321-Sep-16 4:53 
GeneralRe: VB - Looping Pin
ZurdoDev21-Sep-16 5:05
professionalZurdoDev21-Sep-16 5:05 
GeneralRe: VB - Looping Pin
Jughead322-Sep-16 4:52
Jughead322-Sep-16 4:52 
GeneralRe: VB - Looping Pin
Richard MacCutchan22-Sep-16 5:47
mveRichard MacCutchan22-Sep-16 5:47 
GeneralRe: VB - Looping Pin
Jughead322-Sep-16 9:06
Jughead322-Sep-16 9:06 
thank you, I added that in and it works, however not exactly the way I want. Loops through supervisor but not getting all users. Frown | :(

VB
Sub LoopUsers()
    
    Dim l As Long
    Dim j As Long
	Dim k As Long
    
    With Sheet1
        For l = 2 To .Cells(Rows.Count, 1).End(xlUp).Row
            If sSuper = "" Then
                sGreeting = .Cells(l, 1).Value
                sEmail = .Cells(l, 2).Value
                sCC = .Cells(l, 9).Value
                sSuper = .Cells(l, 7).Value

            For j = 2 To .Cells(Rows.Count, 1).End(xlUp).Row
                If sUser = "" Then
                    'sGreeting = .Cells(j, 1).Value
                    'sEmail = .Cells(j, 2).Value
                    'sCC = .Cells(j, 9).Value
                    sUser = .Cells(j, 3).Value
                    sName = .Cells(j, 4).Value
                    sDescription = .Cells(j, 5).Value
                    'sRole = .Cells(j, 6).Value
				For k = 2 To .Cells(Rows.Count, 1).End(xlUp).Row
					If sRole = "" Then
						sRole = .Cells(k, 6).Value
					Else
						sRole = sRole & ", " & .Cells(k, 6).Value
					End If
				Next k	
                'Else
                    'sRole = sRole & ", " & .Cells(j, 6).Value
                End If
                If .Cells(j + 1, 3) <> sUser Then
                End If
            Next j
            End If
            If .Cells(l + 1, 7) <> sSuper Then
            Call SendEmail
            sSuper = ""
            sUser = ""
			sRole = ""
        End If
        Next l
    End With
End Sub

GeneralRe: VB - Looping Pin
Richard MacCutchan22-Sep-16 20:38
mveRichard MacCutchan22-Sep-16 20:38 
GeneralRe: VB - Looping Pin
Jughead323-Sep-16 3:10
Jughead323-Sep-16 3:10 
GeneralRe: VB - Looping Pin
Richard MacCutchan23-Sep-16 3:55
mveRichard MacCutchan23-Sep-16 3:55 
GeneralRe: VB - Looping Pin
Jughead323-Sep-16 11:04
Jughead323-Sep-16 11:04 
GeneralRe: VB - Looping Pin
Richard MacCutchan23-Sep-16 22:43
mveRichard MacCutchan23-Sep-16 22:43 
QuestionUse date format in my program independently from System date format Pin
desanti20-Sep-16 9:34
desanti20-Sep-16 9:34 
AnswerRe: Use date format in my program independently from System date format Pin
Bernhard Hiller20-Sep-16 20:58
Bernhard Hiller20-Sep-16 20:58 
AnswerRe: Use date format in my program independently from System date format Pin
Richard Deeming21-Sep-16 3:01
mveRichard Deeming21-Sep-16 3:01 
QuestionProblem with connectionstrings Pin
desanti20-Sep-16 6:30
desanti20-Sep-16 6:30 
QuestionRe: Problem with connectionstrings Pin
Mathi Mani20-Sep-16 7:15
Mathi Mani20-Sep-16 7:15 
AnswerRe: Problem with connectionstrings Pin
ZurdoDev20-Sep-16 7:56
professionalZurdoDev20-Sep-16 7:56 
QuestionVisual Basic Pin
mariajohnson15-Sep-16 0:55
mariajohnson15-Sep-16 0:55 
QuestionRe: Visual Basic Pin
Richard MacCutchan15-Sep-16 1:42
mveRichard MacCutchan15-Sep-16 1:42 
AnswerRe: Visual Basic Pin
Tim Carmichael15-Sep-16 5:00
Tim Carmichael15-Sep-16 5:00 
QuestionVB6 app loses mojo - runs 3 times slower Pin
Dr Memory14-Sep-16 20:07
Dr Memory14-Sep-16 20:07 
AnswerRe: VB6 app loses mojo - runs 3 times slower Pin
Mycroft Holmes16-Sep-16 13:31
professionalMycroft Holmes16-Sep-16 13:31 
GeneralRe: VB6 app loses mojo - runs 3 times slower Pin
Dr Memory16-Sep-16 19:22
Dr Memory16-Sep-16 19:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.