Click here to Skip to main content
15,900,378 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionhow to count char in string Pin
Member 1257898824-Sep-16 17:49
Member 1257898824-Sep-16 17:49 
AnswerRe: how to count char in string Pin
Richard MacCutchan24-Sep-16 20:37
mveRichard MacCutchan24-Sep-16 20:37 
QuestionPads Layout VB script Pin
Karthi veerappan20-Sep-16 18:28
Karthi veerappan20-Sep-16 18:28 
AnswerRe: Pads Layout VB script Pin
Chris Quinn20-Sep-16 21:31
Chris Quinn20-Sep-16 21:31 
PraiseRe: Pads Layout VB script Pin
Maciej Los21-Sep-16 5:13
mveMaciej Los21-Sep-16 5:13 
GeneralRe: Pads Layout VB script Pin
Chris Quinn21-Sep-16 21:11
Chris Quinn21-Sep-16 21:11 
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 
This creates an email for each user and lists all their roles. I have been racking my brain trying to add another loop (possibly For Each?) that creates an email for all users of a given supervisor (column 7). For example, if a super has 3 employees, it creates 3 emails, I want it to create 1. It should loop through all supervisors sending them an email that includes all their workers.

I left the email piece off, below code works in Excel but generates an email for every user (column 3).

Anyone have any ideas? Please and thank you.

VB
Sub LoopUsers()
    
    Dim l As Long
    
    With Sheet1
        For l = 2 To .Cells(Rows.Count, 1).End(xlUp).Row
            If sUser = "" Then
                sGreeting = .Cells(l, 1).Value
                sEmail = .Cells(l, 2).Value
                sCC = .Cells(l, 9).Value
                sUser = .Cells(l, 3).Value
                sName = .Cells(l, 4).Value
                sDescription = .Cells(l, 5).Value
                sRole = .Cells(l, 6).Value
            Else
                sRole = sRole & ", " & .Cells(l, 6).Value
            End If
            If .Cells(l + 1, 3) <> sUser Then
                Call SendEmail
                sUser = ""
            End If
        Next l
    End With
End Sub

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 
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 

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.