troubleshooting Question

I get vba error 462 the remote server machine does not exist or is unavailable

Avatar of Armando Vilela Baiões
Armando Vilela BaiõesFlag for Portugal asked on
Microsoft AccessVBA
7 Comments1 Solution317 ViewsLast Modified:
Hello Fellows

I get the above error when i run the code bellow , but when i re-run it after the error occur, the code seems to Work fine. For sure im missing something in it. Can you point me the right way to do this?



Thanks in advanced.

First sub:

Private Sub Command54_Click()


Forms!frmFScomposicao!subfrmKitCenas![FSKitCenasOLE].Verb = acOLEVerbOpen
Forms!frmFScomposicao!subfrmKitCenas![FSKitCenasOLE].Verb = acOLEVerbOpen
Set GeraKit0 = Forms!frmFScomposicao!subfrmKitCenas!FSKitCenasOLE.Range

With GeraKit0.Select
GeraKit0.WholeStory
GeraKit0.Delete
End With

Dim FirstTime As Integer
FirstTime = 1

Me.FirstTimeBox = FirstTime

Forms!frmFScomposicao!PRODUCAO.SetFocus

DoCmd.RunCommand acCmdRecordsGoToFirst
For f = 1 To Forms!frmFScomposicao!PRODUCAO![Tiroliro]
Me.FirstTimeBox = FirstTime

Call CompilarKitDiaGravacao
Forms!frmFScomposicao!PRODUCAO.SetFocus
FirstTime = FirstTime + 1

DoCmd.RunCommand acCmdRecordsGoToNext

Next f

DoCmd.RunCommand acCmdRecordsGoToFirst

End Sub


Second sub:

Public Sub CompilarKitDiaGravacao()
'Set cenaspararecolher = Forms!frmFScomposicao!PRODUCAO.Action = acOLEActivate
Set cenaspararecolher = Forms!frmFScomposicao!PRODUCAO![Prod_Cena_Guiao].Range
With cenaspararecolher.Select
cenaspararecolher.WholeStory
cenaspararecolher.Copy
Set cenaspararecolher = Nothing
End With

If Forms!frmFScomposicao.FirstTimeBox = 1 Then

Set Vinho = Forms!frmFScomposicao!subfrmKitCenas!FSKitCenasOLE.Range
With Vinho.Select
Selection.EndKey wdStory
Selection.InsertBreak Type:=wdSectionBreakContinuous
Selection.PasteAndFormat wdPasteDefault
End With
Forms!frmFScomposicao!FirstTimeBox = Forms!frmFScomposicao!FirstTimeBox + 1

Else

Set Vinho = Forms!frmFScomposicao!subfrmKitCenas!FSKitCenasOLE.Range
With Vinho.Select
Selection.EndKey wdStory
Selection.InsertBreak 'Type:=wdSectionBreakContinuous
Selection.PasteAndFormat wdPasteDefault
End With
 End If


End Sub
ASKER CERTIFIED SOLUTION
Armando Vilela Baiões
Self-taught

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros