![]() |
Write Data from Control on a Windows Form
Would someone tell me how to write data from a text or combo box on a Windows
Form to the Active Cell in an Excel spreadsheet? |
Write Data from Control on a Windows Form
Ted
It basically looks like this ActiveCell.Value = Userform1.Combobox1.Text ActiveCell.Value = Userform1.Textbox1.Text -- Dick Kusleika MVP - Excel Excel Blog - Daily Dose of Excel www.dicks-blog.com "Ted" wrote in message ... Would someone tell me how to write data from a text or combo box on a Windows Form to the Active Cell in an Excel spreadsheet? |
Write Data from Control on a Windows Form
Dick,
Thanks, it looks like it worked fine in VBA. Just 1 other question? I am unable to reference the ActiveCell in .Net (VS Tools for Office). Which has led me to try something like the following... Dim intRange As Excel.Range = Me.thisWorksheet.Range("ActiveCell"). Would you know how I could reference the Active Cell in .Net? so that I can write from the Windows Form to the Cell and recieve from the Cell back to the Form? Ted "Dick Kusleika" wrote: Ted It basically looks like this ActiveCell.Value = Userform1.Combobox1.Text ActiveCell.Value = Userform1.Textbox1.Text -- Dick Kusleika MVP - Excel Excel Blog - Daily Dose of Excel www.dicks-blog.com "Ted" wrote in message ... Would someone tell me how to write data from a text or combo box on a Windows Form to the Active Cell in an Excel spreadsheet? |
Write Data from Control on a Windows Form
Ted
I don't know. If you ask in microsoft.public.vsnet.vstools.office I'll bet you'll get an answer. I'll bet its Me.thisWorksheet.Activecell but you should really ask the experts. -- Dick Kusleika MVP - Excel Excel Blog - Daily Dose of Excel www.dicks-blog.com "Ted" wrote in message ... Dick, Thanks, it looks like it worked fine in VBA. Just 1 other question? I am unable to reference the ActiveCell in .Net (VS Tools for Office). Which has led me to try something like the following... Dim intRange As Excel.Range = Me.thisWorksheet.Range("ActiveCell"). Would you know how I could reference the Active Cell in .Net? so that I can write from the Windows Form to the Cell and recieve from the Cell back to the Form? Ted "Dick Kusleika" wrote: Ted It basically looks like this ActiveCell.Value = Userform1.Combobox1.Text ActiveCell.Value = Userform1.Textbox1.Text -- Dick Kusleika MVP - Excel Excel Blog - Daily Dose of Excel www.dicks-blog.com "Ted" wrote in message ... Would someone tell me how to write data from a text or combo box on a Windows Form to the Active Cell in an Excel spreadsheet? |
All times are GMT +1. The time now is 07:37 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com