MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
Dim xlObject As Excel.Application Dim xlWB As Excel.Workbook Set xlObject = New Excel.Application 'This Adds a new woorkbook, you could open the workbook from file also Set xlWB = xlObject.Workbooks.Add Clipboard.clear 'Clear the Clipboard With MSHFlexGrid1 'Select Full Contents (You could also select partial content) .Col = 0 'From first column .Row = 0 'From first Row (header) .ColSel = .Cols - 1 'Select all columns .RowSel = .Rows - 1 'Select all rows Clipboard.SetText .Clip 'Send to Clipboard End With With xlObject.ActiveWorkbook.ActiveSheet .Range("A6").Select 'Select Cell A1 (will paste from here, to different cells) .Paste 'Paste clipboard content xlObject.ActiveWorkbook.ActiveSheet.Range("B7").Select xlObject.ActiveWorkbook.ActiveSheet.Columns("B:AD").AutoFit xlObject.ActiveWindow.FreezePanes = True
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|maro to copy and paste from one worksheet to another based on a condition||11||70|
|Protecting vb6 & .Net code Obfuscation||18||210|
|adding "ungroup sheets" to existing vbs code||5||74|
|Fastest way to find and count same items VB6||16||62|
Join the community of 500,000 technology professionals and ask your questions.