hobbes2103 Posted July 28, 2003 Posted July 28, 2003 Hi! I have a form1 and when i press on button1 it opens an Excel sheet, copies the text in cell A1 and pastes it in A2. I've tried this copy-paste code : xlsheet.Range("A1").Copy() xlsheet.Range("A2").Paste() Of course it doesn't work and i get an error message : i think i have to select A2 before pasting in it, but i can't figure ou the code for it... :confused: Can someone help me with the copy-paste syntax for Excel in VB.Net? Thank you!!! Quote
bob01900 Posted July 29, 2003 Posted July 29, 2003 Have you tried this? oSht.Range("A2").Value = oSht.Range("A1").Value Quote
Leaders dynamic_sysop Posted July 29, 2003 Leaders Posted July 29, 2003 objSheet.Range("A1").Copy(objSheet.Range("A2")) '/// that copies A1 and puts it to A2 :) Quote
Recommended Posts