hi,
i am trying to send data to specific range with specific textbox, i am trying below code but its not working
i need a faster code to do this taskPlease Login or Register to view this content.
thank you
hi,
i am trying to send data to specific range with specific textbox, i am trying below code but its not working
i need a faster code to do this taskPlease Login or Register to view this content.
thank you
Use Code-Tags for showing your code :
Please mark your question Solved if there has been offered a solution that works fine for you
If You like solutions provided by anyone, feel free to add reputation using STAR *
You say it's not working but then imply it is when you say it's not quick enough. Which is it?
Is there any sort of direct relationship between the cell row numbers and the textbox number?
Even if not I'd be inclined to create an array of the cell values and associate each textbox with the array index. So for instance E2 (I can't see an E1) would be TextBox1, the next cell which appears to be E6 would be associated with TextBox2.
You could then use a loop and loop through the array using the loop counter to read the cell in the array which needs to carry the textbox value.
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star icon below the post.
Yes i said its not working, i said i need fast version because i want a working fast version. Sorry for the miss understand,
Btw
We can change the order of texboxes
Like
E2.value = textbox1
E6.value = textbox2
E10.value = textbox3
E14.value = textbox4
And continue
Each time row difference is 4
I mean every other texbox should send data to every forth row
And
Thank yoi for the reply mod
I tried many time to do this but failed evry time
Hi,
Here's one approach
Name your Textboxes 1 to 34 and in the CommandButton UserForm object (or whatever you're using to fire the macro) run the following.
It's a moot point whether you name the textboxes 1 to 34, or whether you name them the same as the cells to which their contents are destined. In which case change the macro to.Please Login or Register to view this content.
Please Login or Register to view this content.
Thank you Mod
there is a little problem, otherwise code is working as i wanted,
and the problem is ?
i fill some value to my textboxes, textbox2, textbox6, textbox18, then only these value should send to the range, others textboxes are blank (no value input ) so ignore them only send filed textboxes value
thank you
Try this.
Please Login or Register to view this content.
Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks