View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.setup
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Auto_Open one time

Code your auto_open so's it looks for a flag in a cell.

The flag can be anything like a text string.........."qwerty"

If this flag is present, the auto-open will stop.

Private Sub Auto_Open()
If Sheets("Sheet1").Range("a1").Value < "qwerty" Then Exit Sub
MsgBox "do the stuff"
End Sub


Gord Dibben MS Excel MVP

On 24 May 2007 13:10:46 -0700, wrote:

I'm relatively new to VBA and I'm trying to write a macro that will
Auto_Open on the first try and place a chart on the excel sheet. I've
gotten Excel (v. 2003) to create and save the chart automatically when
you open the workbook, but the problem is that every time the workbook
is opened the chart is replicated. How can keep the chart from
replicating. In other words, how do I only open the chart
automatically upon opening the file one time? Any advice is greatly
appreciated