ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Setting Names from a workbook to a value in a Macro (https://www.excelbanter.com/excel-programming/364595-setting-names-workbook-value-macro.html)

[email protected]

Setting Names from a workbook to a value in a Macro
 
I have a workbook with a name "boolPaintCells", which is a boolean and
refers to a cell in sheet 1. I want to have my macro change
boolPaintCells value to FALSE (and thus the cell to false?), so I put
in:

Workbook.Names("boolPaintCells").Value = False

It returns a run time error which, when debugged, stops at the above
line of code. Any suggestions about what I am doing wrong?


Ardus Petus

Setting Names from a workbook to a value in a Macro
 
Range("boolPaintCells").Value=False

HTH
--
AP

a écrit dans le message de news:
...
I have a workbook with a name "boolPaintCells", which is a boolean and
refers to a cell in sheet 1. I want to have my macro change
boolPaintCells value to FALSE (and thus the cell to false?), so I put
in:

Workbook.Names("boolPaintCells").Value = False

It returns a run time error which, when debugged, stops at the above
line of code. Any suggestions about what I am doing wrong?




[email protected]

Setting Names from a workbook to a value in a Macro
 
Worked like a charm. Thanks.

-Abe


Ardus Petus wrote:
Range("boolPaintCells").Value=False

HTH
--
AP

a écrit dans le message de news:
...
I have a workbook with a name "boolPaintCells", which is a boolean and
refers to a cell in sheet 1. I want to have my macro change
boolPaintCells value to FALSE (and thus the cell to false?), so I put
in:

Workbook.Names("boolPaintCells").Value = False

It returns a run time error which, when debugged, stops at the above
line of code. Any suggestions about what I am doing wrong?




All times are GMT +1. The time now is 09:28 AM.

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