Cell value = 1 when open

  • Thread starter Thread starter gavmer
  • Start date Start date
G

gavmer

Hi again all,

Am having trouble with the following. Would like to have cell d13 o
sheet FEDEX calculator value = 1 when opened.

Any ideas???

Cheers!!!!!


Private Sub Workbook_Open()
Worksheets("FEDEX calculator").Range("D13").Value = 1
End Su
 
Seems okay, what happens?

Any other code, such as worksheet event code, tracking the same cell?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Hi Bob

Basically whenever my workbook opens or has its contents cleared, i would like a default value of 1 in cell D13.

Possible??

Thanks Bob!!

----- Bob Phillips wrote: ----

Seems okay, what happens

Any other code, such as worksheet event code, tracking the same cell

--

HT

Bob Phillip
... looking out across Poole Harbour to the Purbeck
(remove nothere from the email address if mailing direct
 
Yes, and your code (seems to) does just that, on a workbook open. The code
needs to go in the ThisWorkbook code module. Where have you put it?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

gavmer said:
Hi Bob,

Basically whenever my workbook opens or has its contents cleared, i would
like a default value of 1 in cell D13.
 
Hi Bob,

It is in the code module when the book is first opened. A few othe
codes are there also (click events).

???
 
Gav,

Does the code module mean ThisWorkbook? Workbook events must be in
ThisWorkbook, otherwise they are simply ignored.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
hi bob,

got it worked out. Thanks...had it in the wrong module!!!!

Cheers!!!!!
 
Good, a common mistake,

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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