LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default How To Pass Value Using "ByRef"

Hi,
I am trying to change the counter position in a program from what it would
normally be if the program followed its original logic and I am trying to use
the ByRef method to do this. Can't find too much written about this in the VBA
books I looked at but it looks rather simple. I'm missing something because
it does not work.

I have a main program called Dog() which moves a cell counter by one and uses
the name "Count" to point to a cell Cell (Count, 1). Dog has several
"subprograms" which perform tasks and return to Dog. One of the subprogram's
tasks is to change the cell pointer from what it would be if followed the 'i= 1
to 100... Count = Count +...next i" method of looping used in Dog. A certain
cell value causes a subprogram in Dog, say Sub Cat, to perform another
calculation and change the Count value by one. If the next value of Count when
Dog is performed would be, say, 6, Cat changes to it 7. I need to tell Dog the
new value of Count is 7. I tried passing the new count value from Cat to Dog
with the line Dog(ByRef Count) and I keep getting error messages of "Expected
Expression" and "Syntax Error." Can anyone tell me how to pass a changed
counter value using the ByRef technique and what I am doing wrong?

Thanks

 
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
correct syntax for nesting "if", "and", and "vlookup"....if possib Christine Excel Worksheet Functions 4 January 2nd 09 10:43 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 01:52 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"