Hi everyone,
This is my first post on this site so I apologise in advance if I am not making any sense.
I've embedded 2 VBL codes into 2 buttons. One of the code's work, however the other one doesn't.
The 2nd code works, but the first one doesn't. Thus when I click the button named "Command53", it opens up Microsoft Word. However when I click the button named "Command31", it doesn't work. What happens is it tries to open but fails.
Does anyone know why this might be happening and what the soultion is?
This is my first post on this site so I apologise in advance if I am not making any sense.
I've embedded 2 VBL codes into 2 buttons. One of the code's work, however the other one doesn't.
Code:
Private Sub Command31_Click()
Dim oApp As Object
Set oApp = CreateObject("Excel.Application")
oApp.Visible = True
End Sub
Code:
Private Sub Command53_Click()
Dim oApp As Object
Set oApp = CreateObject("Word.Application")
oApp.Visible = True
End Sub
The 2nd code works, but the first one doesn't. Thus when I click the button named "Command53", it opens up Microsoft Word. However when I click the button named "Command31", it doesn't work. What happens is it tries to open but fails.
Does anyone know why this might be happening and what the soultion is?
Last edited: