Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default macro with dynamic input

Thanks Susan

I got hint from your reply

dim myValue as variant
myValue = worksheet("sheet1").range("A1")





--
No one can steal your knowledge


"Susan" wrote:

are you taking about VB or VBA? there's a difference.
if you're talking about VBA, then all you have to do is declare the
variable. as long as that worksheet is still open, the variable will
still be there.........

for code in THAT worksheet:

dim myValue as variant
myValue = worksheet("sheet1").range("A1")

for code in a DIFFERENT workbook (that must be open):
dim myValue as variant
dim wb1 as workbook
dim ws1 as worksheet

set wb1 = DifferentWorkbook.xls
set ws1 = Worksheets(1)

myValue = wb1.ws1.range("A1")

if you're talking about VB, i don't know. try the programming
newsgroup.
:)
susan




On Apr 23, 9:28 am, Ahmaq wrote:
Hi all

I want to pass on cell value of A1 into VB script every time i run a macro

which command should i use?

--
No one can steal your knowledge




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
input box within macro Drummy Excel Worksheet Functions 1 June 7th 06 09:38 AM
Generating dynamic charts based on the user input shivan4u Charts and Charting in Excel 4 February 13th 06 12:43 PM
Waiting for Input in a macro dhatul Excel Discussion (Misc queries) 1 January 19th 06 06:28 AM
Having a Macro Prompt Me For Input carl Excel Worksheet Functions 3 January 13th 06 02:24 PM
ADDRESS function - dynamic input cell claytorm Excel Discussion (Misc queries) 1 June 28th 05 02:05 PM


All times are GMT +1. The time now is 08:29 PM.

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

About Us

"It's about Microsoft Excel"