Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I thought I had this figured out; but apparently not.
I have variables I'm passing between subs and they are not being returned. here's the code: =========================================== Public Next_Prog, Last_Prog, Start_add As Variant Public ProgName, Levels As String ----------------------------------------------------------------------- Range("A2").Select Prog_row = ActiveCell.Row Selection.End(xlDown).Select Last_Prog = ActiveCell.Row Range("A2").Select ProgName = ActiveCell.Value Levels = ActiveCell.Offset(0, 1) ActiveCell.Offset(1, 0).Select Next_Prog = ActiveCell.Address Range("D4").Select Row_nbr = ActiveCell.Row Start_add = ActiveCell.Address Selection.End(xlDown).Select Last_row = ActiveCell.Row Range(Start_add).Select Do While ActiveCell.Row <= Last_row If ActiveCell.Value = ProgName Then .... do statements End If Call Set_Prg_Name Loop --------------------------------------------- Sub Set_Prg_Name() Range(Next_Prog).Select If ActiveCell.Row Last_Prog Then Else ProgName = ActiveCell.Value Levels = ActiveCell.Offset(0, 1) ActiveCell.Offset(1, 0).Select Next_Prog = ActiveCell.Address Range(Start_add).Select End If <the var value changes here but is not <transfered back when returning to the <previous calling sub. End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Passing Variables | Excel Discussion (Misc queries) | |||
Passing variables from one sub to another | Excel Programming | |||
Passing Variables | Excel Programming | |||
passing variables | Excel Programming | |||
Passing Variables | Excel Programming |