• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Entering UserForm Text Into Cell?

Having issues with the following beneath:


Private Sub Enter_Manual_Revisions_Click()

Enter_Manual_Revision_UserFormField.Text = C.Value

End Sub


In a public sub I'm using a For Each C In Range.


It opens up the userform if any criteria is found, displays the first one found, I modify it in the text field on the userform, and the plan is to overwrite the old with new revised string on the sheet. (...so on and so forth until all are revised).


I can do everything except write it back down to the sheet.


Any help would be great.
 
Here's an organized example workbook with buttons.


Please have a look.


http://www.iandmyself.me/Example_UserForm_Workbook.xlsm
 
so.....


'accept manual revision' should change the cell currently being worked with?
 
Shouldn't it be just the opposite of how you got the cell value in the caption?


In piss poor psuedo code:


textbox.text = range("whatevercell").value


as opposed to:


range("whatevercell").value = textbox.text


?
 
I wasn't sure which way it was supposed to be honestly.


In theory my assumption was one way writes it up, and the other way writes it down.
 
More clarity (all I need).


If I specify which cell directly I want my textbox.text to go in it works.

textbox.text = Range("A2").Value


However,


I'm searching through Dim Cell As Range (or Dim C As Range whichever), and I have no idea which Cell I'm on to write the data back to.


I've been at this for hours, is this even possible?
 
Resolved.


I did this the only way I knew how.


I'm sure it's a better way. The accept manual changes button is simply:

ActiveCell.Value = TextBox.Text


It's messy but it works.


http://www.iandmyself.me/My.Crazy.Solution.txt
 
indi,


I'm guessing somewhere you had similar to this?

For each C in Range(MyRange)

'Other stuff


Ths "C" is the cell you are looking at. You should be able to do this then:

C.Value = TextBox.Text
 
Back
Top