For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
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.
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.
Dim l AsLongWith Sheet1
For l = 2To .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
sRole = sRole & ", " & .Cells(l, 6).Value
EndIfIf .Cells(l + 1, 3) <> sUser ThenCall SendEmail
sUser = ""EndIfNext l
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.
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.
I have a vb.net program.
In my program I want to use dates in the format "dd/MM/yyyy".
But when the windows date format is different I get errors.
For example if my program is executed in a Pc where the date is in the format : mm/dd/yyyy I get errors for example when day is more than 12 :
Dim dt As DateTime = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")
I get error :
Conversion fromstring"20/09/2016 21:21:47" to type 'Date'is not valid.
What can I do to make my program work whatever the windows date format is configured.
Last Visit: 31-Dec-99 18:00 Last Update: 26-Sep-16 14:48