|
I've got this mail
Your message 'Re: Finding the path to the pictures' has been marked as potentially being spam and is currently in the moderation queue pending approval.
Why????
|
|
|
|
|
Because the site spam filters don't trust you nor your message.
Yes, it does come up with a bunch of false positives. No, there's nothing you can do about it.
|
|
|
|
|
|
Dear Friends
how to append char in VB6.0
thanks
|
|
|
|
|
Same answer as below; please read the documentation.
|
|
|
|
|
If you're asking question this basic, you SERIOUSLY need to pick up a book on VB.NET and work through it.
Forget VB6.
|
|
|
|
|
Dear friends
i write a vb program. in this program a string "john????". and in string count char "?".
thanks
|
|
|
|
|
See the documentation for the String class, there is most likely a method that gives the result.
|
|
|
|
|
Hi guys,
Is any having Pads layout vb-scripting Documents
kindly help me anyone guys.
I believe that will get quick response.
[edit user="me"]
Removed bolding - we can all read.
[/edit]
modified 21-Sep-16 4:12am.
|
|
|
|
|
The quick response is "What does that mean?". It makes absolutely no sense in English. I realise that English may not be your first language, but please explain what you want clearly or nobody will be able to help you.
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
A 5for optoholic
Does it changes your perspective?
|
|
|
|
|
It depends how thick the bottom of the glass is!
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
Karthi veerappan wrote: Is any having Pads layout vb-scripting Documents This does not make any sense. Please explain clearly.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
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.
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
|
|
|
|
|
Sort by supervisor and then loop through your cells. Concatenate the list of employees and when the supervisor changes you send the email and reset the variable storing the employees.
Pretty simple. Just think it through, perhaps write it down on paper and then translate to code.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Not sure I exactly follow - wouldn't a For Each or While loop work here? Not well versed in nested loops. Seems simple bu tI have yet to get anything to work.
|
|
|
|
|
Any type of loop will work. Again, just write it out on paper and then translate to code if you are stuck.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Trying this but keep getting a compile error "Next without For". Statements are lined up, not sure - breaking on Next l
Sub LoopUsers()
Dim l As Long
Dim j As Long
With Sheet1
For l = 2 To .Cells(Rows.Count, 1).End(xlUp).Row
If sSuper = "" Then
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
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 = ""
Next l
End With
End Sub
|
|
|
|
|
If .Cells(l + 1, 7) <> sSuper Then
Call SendEmail
sSuper = ""
Next l
There is no matching end If clause.
|
|
|
|
|
thank you, I added that in and it works, however not exactly the way I want. Loops through supervisor but not getting all users.
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
sUser = .Cells(j, 3).Value
sName = .Cells(j, 4).Value
sDescription = .Cells(j, 5).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
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
|
|
|
|
|
Jughead3 wrote: Loops through supervisor but not getting all users. It's not clear what your code is supposed to be doing, so I cannot make any suggestion. When you say "Loops through supervisor", what exactly does that mean, and where are the users?
|
|
|
|
|
I can't post worksheet so I explain in simplest terms
column A + B for email piece
column C = username (USER)
column D = name of user
column E = description (for email)
column F = role (user's role or roles)
column G = supervisor (of user)
I have code that loops through users and generates emails perfectly BUT let's say the supervisor has 20 employees; they would receive 20 emails in this scenario. I would like for them to receive 1 single email listing ALL of their users. This is what I mean by looping through the supervisor - getting their user data including roles.
Hope this makes better sense. Thank you.
|
|
|
|
|
Then you just need to loop through all the records making a list (or lists) where the supervisor is the same. Then use each list to send the emails.
|
|
|
|
|
Not that simple. Data is an extract - usernames can repeat along with supervisor. The unique piece (data point) is their role which is why this is in the code
sRole = .Cells(l, 6).Value
Else
sRole = sRole & ", " & .Cells(l, 6).Value
|
|
|
|
|
I am sorry bu that means nothing to me, as I have no idea what the structure of your data is. However, the issue is the same as most problems of this type. You must run through the data as many times as necessary to build the groups which have the common item (e.g supervisor, role etc) that you are interested in. The first thing to do is write down all the common criteria, and then decide on how to build the groups using those rules.
|
|
|
|