ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cell value = 1 when open (https://www.excelbanter.com/excel-programming/298772-cell-value-%3D-1-when-open.html)

gavmer[_17_]

Cell value = 1 when open
 
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

--
Message posted from http://www.ExcelForum.com


Bob Phillips[_6_]

Cell value = 1 when open
 
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)

"gavmer " wrote in message
...
Hi again all,

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

Any ideas???

Cheers!!!!!


Private Sub Workbook_Open()
Worksheets("FEDEX calculator").Range("D13").Value = 1
End Sub


---
Message posted from http://www.ExcelForum.com/




gavmer

Cell value = 1 when open
 
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

"gavmer " wrote in messag
..
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 =
End Su
--

Message posted from http://www.ExcelForum.com


Bob Phillips[_6_]

Cell value = 1 when open
 
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" wrote in message
...
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?

--

HTH

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

"gavmer " wrote in message
...
Hi again all,
Am having trouble with the following. Would like to have cell d13

on
sheet FEDEX calculator value = 1 when opened.
Any ideas???
Cheers!!!!!
Private Sub Workbook_Open()

Worksheets("FEDEX calculator").Range("D13").Value = 1
End Sub
---

Message posted from http://www.ExcelForum.com/




gavmer[_20_]

Cell value = 1 when open
 
Hi Bob,

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

???

--
Message posted from http://www.ExcelForum.com


Bob Phillips[_6_]

Cell value = 1 when open
 
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)

"gavmer " wrote in message
...
Hi Bob,

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

????


---
Message posted from http://www.ExcelForum.com/




gavmer[_25_]

Cell value = 1 when open
 
hi bob,

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

Cheers!!!!!

--
Message posted from http://www.ExcelForum.com


Bob Phillips[_6_]

Cell value = 1 when open
 
Good, a common mistake,

--

HTH

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

"gavmer " wrote in message
...
hi bob,

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

Cheers!!!!!!


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 09:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com