![]() |
help to change data in cells
I want to view cell data from a row that have 6 colums in textboxes and I want to be able to change data in the cell by typing a value in a textbox that contains the cell data from that row and then want a macro to update the sheet with the new value for example I have cell that contains a number, say 5, and when I write 10 in the textbox and click on a commandbutton I want the macro to change the cell value from 5 to 10. How do I do that? I would be grateful if someone can help me :) -- trixxarn ------------------------------------------------------------------------ trixxarn's Profile: http://www.excelforum.com/member.php...o&userid=25036 View this thread: http://www.excelforum.com/showthread...hreadid=385635 |
help to change data in cells
Hi Trixxarn,
Did you try the LinkedCell property of the textbox? You could assign the address of the cell you want to modify there. This way you wouldnt need another event handler to modify the values. HTH Jayant |
help to change data in cells
Much depends on where you got the text box from.
If it is from one of the Toolboxes than you can set the LinkedCell or ControlSource property. If it is a drawing text box - you can assign code to it. In fact you can assign code to most text boxes. But first we need to know what kind of text box you are using... -- steveB Remove "AYN" from email to respond "trixxarn" wrote in message ... I want to view cell data from a row that have 6 colums in textboxes and I want to be able to change data in the cell by typing a value in a textbox that contains the cell data from that row and then want a macro to update the sheet with the new value for example I have cell that contains a number, say 5, and when I write 10 in the textbox and click on a commandbutton I want the macro to change the cell value from 5 to 10. How do I do that? I would be grateful if someone can help me :) -- trixxarn ------------------------------------------------------------------------ trixxarn's Profile: http://www.excelforum.com/member.php...o&userid=25036 View this thread: http://www.excelforum.com/showthread...hreadid=385635 |
help to change data in cells
How about a simple input box? Give this a try. You will need the first cell on the row you want to change as the active cell before starting the macro. Sub ChangeCellValue() Dim x As Integer For x = 0 To 5 ActiveCell.Offset(0, x).Value = InputBox(ActiveCell.Offset(0, x).Value, _ "Enter the New Value Here") Next x End Sub HTH -- bhofsetz ------------------------------------------------------------------------ bhofsetz's Profile: http://www.excelforum.com/member.php...o&userid=18807 View this thread: http://www.excelforum.com/showthread...hreadid=385635 |
help to change data in cells
Hi! Thanks for the help :) It worked perfect -- trixxarn ------------------------------------------------------------------------ trixxarn's Profile: http://www.excelforum.com/member.php...o&userid=25036 View this thread: http://www.excelforum.com/showthread...hreadid=385635 |
All times are GMT +1. The time now is 07:27 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com