saving after entry in specific cells

  • Thread starter Thread starter MIke
  • Start date Start date
M

MIke

I am trying to save a workbook if data is entered in a specific cell. I was
given the following code on this site and I am getting a Compile error that
reads Method or data member not found. I have little knowledge of VBA and I
can not figure out the problem. Any help or suggestions would be greatly
appreciated.
Thanks for the help,
Mike
 
Dave,

It eliminates the error message but the sheet isnt saving automatically.
Could I be do something else wrong? Again Thanks for all of your help.


Mike
 
It only saves if there is something in each of the cells in myRng.

Do you have something in each of those cells?

ps.

Change this line:
me.parent.save
to
me.save
 
Dave,
Sorry for the lack of detail. Is it possible to have it save if one cell in
the range is changed?
Thanks,
Mike
 
If it's a single cell on a specific worksheet, then I wouldn't use a workbook
event.

I'd use this kind of code behind that specific worksheet (and delete the
original suggestion).

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myRng As Range
Set myRng = Me.Range("a1")

If Intersect(myRng, Target.Cells) Is Nothing Then
Exit Sub
End If

Me.Parent.Save

End Sub


Dave,
Sorry for the lack of detail. Is it possible to have it save if one cell in
the range is changed?
Thanks,
Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top