Click here to Skip to main content
15,886,919 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: drag and drop problem... vb .net Pin
Dave Kreskowiak11-May-07 3:36
mveDave Kreskowiak11-May-07 3:36 
GeneralRe: drag and drop problem... vb .net Pin
daxfrost11-May-07 6:07
daxfrost11-May-07 6:07 
Questionmouse events vb.net 2005 Pin
Sonia Gupta10-May-07 23:34
Sonia Gupta10-May-07 23:34 
AnswerRe: mouse events vb.net 2005 Pin
Christian Graus10-May-07 23:46
protectorChristian Graus10-May-07 23:46 
GeneralRe: mouse events vb.net 2005 Pin
harsh_c11-May-07 0:55
professionalharsh_c11-May-07 0:55 
GeneralRe: mouse events vb.net 2005 Pin
Christian Graus11-May-07 1:55
protectorChristian Graus11-May-07 1:55 
QuestionTalk to an EPP server Pin
shahid_isb8510-May-07 23:21
shahid_isb8510-May-07 23:21 
QuestionVBA-Excel: User Name and eMail Problem [modified] Pin
RichardBerry10-May-07 22:50
RichardBerry10-May-07 22:50 
Hi

Using VBA for Excel - Office XP and 2003

We have an file on a network with a production schedule, that is accessed and modifeid by a couple of users. I am using the Workbook's BeforeSave event to prompt the person who is trying to save the Workbook to send an email to other useds advising them of the changes to the production schedule.

Two questions:

1) How can I get the current Users name? - Not to worry, I have found this!!

2) When I send the mail, I get a pop-up from Outlook saying that another program is tying to send mail, and you then have to click 'Allow for ? Minutes, and say yes. Is there any way to stop this pop-up? I dont mid if the email appears, and the user must clicjk 'Send', but also could not get the code for that. (I.e in the code below, I go myMailItem.Send - I tried myMailItems.Show, but this does not work.

This is the code I am using:

Dim response As String
response = MsgBox("Would you like to email Andrea advising of the the changes you have just saved?", vbYesNo)
If response = 6 Then
Dim User As String 'How do I get UserName ?????
Dim myOutlook As Object
Dim myMailItem As Object
Set myOutlook = CreateObject("Outlook.Application")
Set myMailItem = myOutlook.createitem(0)
myMailItem.Recipients.Add "<name@domain.com>"
myMailItem.Subject = "Production Schedule Changes"
myMailItem.body = "Hi Andi" & Chr(13) & Chr(13) & _
"Please see the latest changes in the Production Schedule" _
& Chr(13) & Chr(13) & "Regards"
myMailItem.Send
Set myOutlook = Nothing
Set myMailItem = Nothing
End If


-- modified at 5:30 Friday 11th May, 2007
QuestionUpdate Table gets message "parameter has no default value" Pin
keninfo10-May-07 22:10
keninfo10-May-07 22:10 
AnswerRe: Update Table gets message "parameter has no default value" Pin
Dave Kreskowiak11-May-07 3:31
mveDave Kreskowiak11-May-07 3:31 
GeneralRe: Update Table gets message "parameter has no default value" Pin
keninfo11-May-07 4:43
keninfo11-May-07 4:43 
GeneralRe: Update Table gets message "parameter has no default value" Pin
keninfo11-May-07 5:17
keninfo11-May-07 5:17 
QuestionEvent and Functions Pin
Sonia Gupta10-May-07 21:52
Sonia Gupta10-May-07 21:52 
AnswerRe: Event and Functions Pin
Christian Graus10-May-07 23:32
protectorChristian Graus10-May-07 23:32 
AnswerRe: Event and Functions Pin
GgAben11-May-07 3:11
GgAben11-May-07 3:11 
AnswerRe: Event and Functions Pin
TwoFaced11-May-07 7:51
TwoFaced11-May-07 7:51 
QuestionList assemblies Pin
Sonia Gupta10-May-07 21:16
Sonia Gupta10-May-07 21:16 
AnswerRe: List assemblies Pin
Dave Kreskowiak11-May-07 3:23
mveDave Kreskowiak11-May-07 3:23 
Questionhow can i give access permission to Active directory user in vb.net Pin
koolprasad200310-May-07 21:14
professionalkoolprasad200310-May-07 21:14 
AnswerRe: how can i give access permission to Active directory user in vb.net Pin
Dave Kreskowiak11-May-07 3:21
mveDave Kreskowiak11-May-07 3:21 
Questionnewbie: class enum query Pin
aitch4210-May-07 21:09
aitch4210-May-07 21:09 
AnswerRe: newbie: class enum query Pin
Christian Graus10-May-07 21:37
protectorChristian Graus10-May-07 21:37 
GeneralRe: newbie: class enum query Pin
aitch4210-May-07 22:25
aitch4210-May-07 22:25 
GeneralRe: newbie: class enum query Pin
Christian Graus11-May-07 0:59
protectorChristian Graus11-May-07 0:59 
GeneralRe: newbie: class enum query Pin
aitch4211-May-07 6:29
aitch4211-May-07 6:29 

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.