View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Run Time error on file name

Brian, I thought that was one of the functions of the button to repopulate
the form, to allow for updates to previously entered data. Is this the part
that is not working? I read Dave's answer about the different workbook name
and that would present a problem if you are trying to recall the data from
that workbook. But I had the impression that you were storing the data to
recover in the master workbook and would then resave the updates in the job
workbook. Maybe my concept was all screwed up.



"Brian" wrote in message
...
I have this code when I go to update a new workbook, but once the workbook
is
updated and saved, it will not allow you to reupdate it. I think the
reason
is because it's looking for the workbook "Master Engineering Spec.xlsm"
and
that is not the workbook name.

Here is the sequence I am following.
1: Open User Form
2: Open New Engineering Spec (Control Button "Open_New_Engineer_Spec_8")
3: Fill in the user Form
4: Update Engineering Spec (Control Button "Update_Engineer_Spec_10"
5: Save Engineering Spec workbook (I automaticaly assigns the name.

Now here is where the problem is. You forgot to fill in something on the
User Form. So you go back and put it in, then you click on the Control
Button
"Update_Engineer_Spec_10" and you get a run Time Error message.

How can I get around this so that it updates the workbook? Do I need to
add
another Control Button to up date exsisting worksbooks?


'Update Engineering Spec Control Button(Sheet 1)
Private Sub Update_Engineer_Spec_10_Click()

With Workbooks("Master Engineering Spec.xlsm").Sheets("COVER SHEET")
'Job Address Information
.Range("A09").Value = Me("Office_1").Value
.Range("A10").Value = Me("Address_11").Value
.Range("A11").Value = Me("Address_12").Value
.Range("A12").Value = Me("City_1").Value
.Range("B12").Value = Me("State_1").Value
.Range("C12").Value = Me("Zip_Code_1").Value

More Code Here, but same as above.

End With