could not set comm state problem in MS comm

i am using the follwing vb code to communicate to a serial printer (Epson TMu210D Point of Sale Printer) but when i run the application it shows run time erro 8015 ,could not set comm state,invalid parameter for communication

MSComm1.CommPort = 2
MSComm1.Settings = "9600,N,8,1"
MSComm1.InputLen = 0
If MSComm1.PortOpen = False Then MSComm1.PortOpen = True

Plz help me out to solve the problem
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


The file replication service cannot process the request. The system volume is busy with a previous request.

Do you have another app already using com2?
sudakarAuthor Commented:
No other applicatoin is not using that port .

When i use this code to open port its opening

open "com2:" for output as #1

close #1

Try CLOSING the port before changing the Settings....

With MSComm1
  If .PortOpen Then
    While .PortOpen
  End If
  .CommPort = 2
  .Settings = "9600,n,8,1"
  While Not .PortOpen
End With

PAQed - no points refunded (of 50)

Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.