Prev: Label printing in VB6
Next: Disabling DBCS...
From: Dennis Rose on 16 Apr 2010 14:45 Using VB5, I want to dial a phone number each time a new file arrives on my computer. I can dial the desired number just fine the first time this code is executed, but when this code is excuted again, the phone is "NOT" dialed. What am I doing wrong? I checked Google but didn't see a similar problem. Note: I could only get this to work if I commented out the "PortClose" command. Private Sub CallSalesperson() MSComm1.CommPort = 3 MSComm1.Settings = "9600,N,8,1" MSComm1.PortOpen = True MSComm1.Output = "ATDT 1-555-555-5555;" & vbCr 'MSComm1.PortOpen = False End Sub Need help!!
From: DanS on 16 Apr 2010 15:07 =?Utf-8?B?RGVubmlzIFJvc2U=?= <DennisRose(a)discussions.microsoft.com> wrote in news:CBE19FF8-BCD0-4205-9964-A356533B399C(a)microsoft.com: > > Using VB5, I want to dial a phone number each time a new > file arrives on my computer. I can dial the desired number > just fine the first time this code is executed, but when > this code is excuted again, the phone is "NOT" dialed. > > What am I doing wrong? I checked Google but didn't see a > similar problem. Note: I could only get this to work if I > commented out the "PortClose" command. > > Private Sub CallSalesperson() > MSComm1.CommPort = 3 > MSComm1.Settings = "9600,N,8,1" > > MSComm1.PortOpen = True > MSComm1.Output = "ATDT 1-555-555-5555;" & vbCr > > 'MSComm1.PortOpen = False > End Sub > > Need help!! > Maybe it's expecting the hang up command to be sent before it will dial again ? (Just a wild stab in the dark.)
From: Dennis Rose on 16 Apr 2010 15:38 This program runs continuesly on a timer which fires and executes the code above once each minute to look for a new file and call the phone number if one is found. "Dennis Rose" wrote: > Using VB5, I want to dial a phone number each time a new file arrives on my > computer. I can dial the desired number just fine the first time this code > is executed, but when this code is excuted again, the phone is "NOT" dialed. > > What am I doing wrong? I checked Google but didn't see a similar problem. > Note: I could only get this to work if I commented out the "PortClose" > command. > > Private Sub CallSalesperson() > MSComm1.CommPort = 3 > MSComm1.Settings = "9600,N,8,1" > > MSComm1.PortOpen = True > MSComm1.Output = "ATDT 1-555-555-5555;" & vbCr > > 'MSComm1.PortOpen = False > End Sub > > Need help!!
From: Jim Mack on 16 Apr 2010 16:03 Dennis Rose wrote: > Using VB5, I want to dial a phone number each time a new file > arrives on my computer. I can dial the desired number just fine > the first time this code is executed, but when this code is excuted > again, the phone is "NOT" dialed. > > What am I doing wrong? I checked Google but didn't see a similar > problem. Note: I could only get this to work if I commented out the > "PortClose" command. > > Private Sub CallSalesperson() > MSComm1.CommPort = 3 > MSComm1.Settings = "9600,N,8,1" > > MSComm1.PortOpen = True > MSComm1.Output = "ATDT 1-555-555-5555;" & vbCr > > 'MSComm1.PortOpen = False > End Sub Try resetting the modem (or hanging up) just before dialing MSComm1.PortOpen = True MSComm1.Output = "ATH" & vbCr DoEvents ' and possibly a short delay MSComm1.Output = "ATDT 1-555-555-5555;" & vbCr DoEvents ' and possibly a short delay MSComm1.PortOpen = False -- Jim Mack Twisted tees at http://www.cafepress.com/2050inc "We sew confusion"
From: David Kaye on 16 Apr 2010 17:00
<DennisRose(a)discussions.microsoft.com> wrote: >> MSComm1.PortOpen = True >> MSComm1.Output = "ATDT 1-555-555-5555;" & vbCr >> >> 'MSComm1.PortOpen = False >> End Sub ATH0 ? |