I am trying to get a portion of code to execute when a user clicks on a command button. I think using an If Statement would be the easiest way to do it, but I am unsure.
I am trying to get a portion of code to execute when a user clicks on a command button. I think using an If Statement would be the easiest way to do it, but I am unsure.
If the CommandButton is on a userform, or from the ActiveX menu, you can use the CommandButton_Click event.
If it is from the Forms menu, you can assign a macro to that control.
_
...How to Cross-post politely...
..Wrap code by selecting the code and clicking the # or read this. Thank you.
Thanks for your input,
So what I am trying to do is upload information I collected using the form onto a spreadsheet. I want each batch of information to be uploaded when the user hits the command button "upload". Where I am struggling is getting it to move to the next row for the next batch of information. I keep getting caught in infinite do loops, so I am looking into doing an if statement that will upload the info every time the button is clicked, row by row.
Is the CommandButton on a userform, ActiveX or from the Forms menu.
Upload the information to the Web? or write it to a worksheet?
To write to the line after the last filled line in column A, I would use code like this. No looping, or If statement, is needed
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks