Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 34
Default HOWTO Reference a named cell or range in a script

In a windows script I have the following statement to put a value
into a worksheet that I have opened in the script:

objExcel.Cells(1, 1).Value = "y"

If I assign a name to cell 1,1 in EXCEL -- say for example print_Y_or_N --
can I then refer to cell 1,1 (in the script) using that name? Sortof like you
could in a VBA macro, like

[print_Y_or_N] = "y"

I think using a name instead of hard-coded cell cooridnate improves
maintainability. Doesn't it?

TIA,

Phil


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default HOWTO Reference a named cell or range in a script

hi
yes. but the syntax would be more like this.

Range("print_Y_or_N") = "Y"

regards
FSt1

"pwrichcreek" wrote:

In a windows script I have the following statement to put a value
into a worksheet that I have opened in the script:

objExcel.Cells(1, 1).Value = "y"

If I assign a name to cell 1,1 in EXCEL -- say for example print_Y_or_N --
can I then refer to cell 1,1 (in the script) using that name? Sortof like you
could in a VBA macro, like

[print_Y_or_N] = "y"

I think using a name instead of hard-coded cell cooridnate improves
maintainability. Doesn't it?

TIA,

Phil


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 34
Default HOWTO Reference a named cell or range in a script

Thanks for your reply FSt1.

objExcel.Range("automationFlag") = "Y"

did the trick.

Phil

"FSt1" wrote:

hi
yes. but the syntax would be more like this.

Range("print_Y_or_N") = "Y"

regards
FSt1

"pwrichcreek" wrote:

In a windows script I have the following statement to put a value
into a worksheet that I have opened in the script:

objExcel.Cells(1, 1).Value = "y"

If I assign a name to cell 1,1 in EXCEL -- say for example print_Y_or_N --
can I then refer to cell 1,1 (in the script) using that name? Sortof like you
could in a VBA macro, like

[print_Y_or_N] = "y"

I think using a name instead of hard-coded cell cooridnate improves
maintainability. Doesn't it?

TIA,

Phil


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying a named range with a changing cell reference [email protected] New Users to Excel 1 February 21st 08 07:49 AM
reference first cell in a named range Robert H Excel Worksheet Functions 3 January 14th 08 07:53 PM
HOW TO EXTRACT CELL REFERENCE AS TEXT FROM NAMED RANGE romelsb Excel Worksheet Functions 0 November 3rd 06 09:49 PM
HowTo disable cell reference update Eggle Charts and Charting in Excel 0 October 4th 06 03:15 PM
Named Range reference via single Cell Graham Excel Discussion (Misc queries) 0 July 26th 06 09:37 AM


All times are GMT +1. The time now is 05:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"