Hi I'm trying to modify the XmlTools.xla plugin.
I have it set up so that the UserForm already displays with everything my users need prefilled. I just need some way to programmatically click the OK button. I tried using send keys in the code snippet shown below but it does not work.
Public Sub sbShowForm()
Application.DisplayAlerts = False
ActiveSheet.Name = "Sheet555"
ActiveSheet.Cells(Rows.Count, 7).End(xlUp).Select
ActiveCell.Name = "lastCell"
ActiveSheet.Cells(1, 1) = "Is this"
frmCreateXmlList.Show
frmCreateXmlList.btnOK_Click
ActiveSheet.Cells(2, 1) = "called?"
Application.SendKeys ("{Enter}")
Application.SendKeys ("{Return}")
CreateXmlFiles.sbUserFormOKClicked
Call sbUserFormOKClicked
Application.DisplayAlerts = True
frmCreateXmlList.Hide
End Sub 'sbShowForm
I realize this request is a little goofy, but I received user requests saying that it is "too much work" to fill out the form. I know SendKeys aren't always reliable, but I'm just looking for something to get it to work.