View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jer jer is offline
external usenet poster
 
Posts: 8
Default UserForm Question

Is it possible to save and close a file via a userform. I
have created a form that I want to survey my internal
customers. The file will reside in a folder to which we
all have access. I was hoping that when the respondent
clicks on the submit button their choice will update
another worksheet (hidden) and close the file
automatically. Everything else seems to be working fine
exept that I cannot get the file to close, any
suggestions?
the following is the last line of code attached to the
Submit button

Private Sub cmdSubmit_Click()
....
Workbooks("example.xls").Close savechanges:=True
end sub

where example.xls is the file that contains the userform
thanks in advance for any help suggestions
jer