Diane,
This code works
Sub commandbutton2_click()
Set myinspector = Item.GetInspector
Set mypage1 = myinspector.modifiedformpages("p.2")
Dim shellRun
Set shellRun = createobject("wscript.shell")
ShellRun.run "explorer c:\documents and settings\stan\desktop\xp
Set shellRun = nothing
End sub
Taking your suggestion I rewrote to use textbox values, the message box line is just to check that it is combining the textboxes correctly. It works, if you could review and see if there is a better way it would be appreciated. Textbox1 would be the only value that would be entered by the form user, textbox2 is only used as a place holder for the complete path.
Sub commandbutton2_click()
Set myinspector = Item.GetInspector
Set mypage1 = myinspector.modifiedformpages("p.2")
Set textbox1 = mypage1.controls("textbox1")
Set textbox2 = mypage1.controls("textbox2")
Set textbox1 = item.userproperties("textbox1")
Set textbox2 = item.userproperties("textbox2")
Textbox2.value = "c:\documents and settings\stan\desktop\" & textbox1.value
Set strPath = item.userproperties("textbox2")
Msgbox strPath
Dim shellRun
Set shellRun = createobject("wscript.shell")
ShellRun.run "explorer " & strPath
Set shellRun = nothing
End sub
Thanks
Sent from my iPad using Tapatalk HD