View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Value from form to excel sheet

Make i a public variable in the module with the code that calls the
userform. Then the userform can see i and use it in its code.


At the top of the general module

Public i as Long

then don't declare it again in your sub or you will be working with a
different (local) version of i.
--
Regards,
Tom Ogilvy


wrote in message
oups.com...
Hi Tom.
This is ok.. But my case is different.
I am working out this partiuclar bit in between some other works
through loops..

I am calling a loop from say 1 to 100 and it will do many other
validations and scoring in each time and after that it will display
some details of the row like name , number etc from the sheet and asks
for this answers.. so if i use the loop and way of adding, how can i
get the aorrect answers of each row into the sheet..

You got me.??
when i use the

userform1.show
the value of the 'i' for loop may be 10 ( lets say like that) , so it
should add the value to the 10th column.

I added a button on the screen to add it, but how can i get that value
of 'i' in the form .

thanks