Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try this
Sub Copy_Rows() With Application .DisplayAlerts = False .ScreenUpdating = False End With FpatH = "C:\Documents and Settings\username\filename.xls" Workbooks.Open FpatH FileP = ActiveWorkbook.path Range("B1:C100").Copy Workbooks.Add ActiveSheet.Paste ActiveWorkbook.SaveAs Filename:= _ FileP & "\" & "1.txt", FileFormat:=xlUnicodeText, CreateBackup:=False ActiveWorkbook.Close True With Application .DisplayAlerts = True .ScreenUpdating = True .CutCopyMode = False End With End Sub On Dec 3, 10:00*am, gedinfo wrote: I would like to be able to copy two columns from a .xls file, columns 2 (B) and 9(I) into a .txt file for approximately 100 rows, using VBA. What is the best way to do this? Thank you |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy and paste selected columns between Excel workbooks | Excel Programming | |||
How I can copy / paste a selected cells to other columns in Excel | Excel Discussion (Misc queries) | |||
Copy selected columns only | Excel Programming | |||
Beginners' Question : How to move selected columns & rows to a two dimensional array | Excel Programming | |||
Beginners' Question : How to move selected columns & rows to a two dimensional array | Excel Programming |