This is not your answer, but maybe you can playing around with the code
The code above will add whether the user select the cell then click OK
or the user does not select the cell then click OK or click Cancel.
After 8 iteration, the sum value will be put to whatever cell the user select on userResponce
The code above will show the addition value into whatever cell the user select on userResponce
That's for your number-1.
For number-2, it's not clear to me how you define the sheet name as variable.
As long as I know, the sheet must active first (or must be activated first) - then you can select the range.
' Would like to use
Range Name "TargetSheet"...but does not work.......COMPILE ERROR - SUB OR FUNCTION NOT DEFINED
'
Sheet(TargetSheet).Activate '*****THIS LINE CAUSES THE ERROR
As long as I know, we cannot
activate a sheet with a code like blue.
What I do is select/activate the sheet first, then activate the named range :
Sheet1.Activate 'don't want to keep this line as it is static
I wonder how you define the sheet name into variable.
Bookmarks