Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Help with Opening with deleing end of File

Have 2 files:
Picklist.xls
Tapecompare.xlt
I have information coming from the mainframe into PickList.xls.
Picklist.xls now has a end of file character. I need to delete the charcter
before opening the template...TapeCompare.xlt. All data will reside in Column
A. The data is a list of tapes numbers. The rows will vary,but the lastrow
after the list will contain the end of file character. I have tried running a
macro ,but no good results from that. here is the code I have .

Private Sub CommandButton1_Click()
Dim LastRow As Long
If Not IsNumeric(LastRow) Then
Range("A65536").End(xlUp).EntireRow.Delete
End If
Workbooks.Open Filename:= _
"C:\Documents and Settings\Owner\My Documents\TapeCompare4.XLT",
UpdateLinks _
:=3, Editable:=True

End Sub





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Help with Opening with deleing end of File

The order of the code looks suspect

Private Sub CommandButton1_Click()
Dim LastRow As Long
LastRow = Range("A65536").End(xlUp).Row
If Not IsNumeric(LastRow) Then
Rows(LastRow).Delete
End If
Workbooks.Open Filename:= _
"C:\Documents and Settings\Owner\My Documents\TapeCompare4.XLT", _
UpdateLinks:=3, Editable:=True

End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"CyndyG" wrote in message
...
Have 2 files:
Picklist.xls
Tapecompare.xlt
I have information coming from the mainframe into PickList.xls.
Picklist.xls now has a end of file character. I need to delete the

charcter
before opening the template...TapeCompare.xlt. All data will reside in

Column
A. The data is a list of tapes numbers. The rows will vary,but the lastrow
after the list will contain the end of file character. I have tried

running a
macro ,but no good results from that. here is the code I have .

Private Sub CommandButton1_Click()
Dim LastRow As Long
If Not IsNumeric(LastRow) Then
Range("A65536").End(xlUp).EntireRow.Delete
End If
Workbooks.Open Filename:= _
"C:\Documents and Settings\Owner\My Documents\TapeCompare4.XLT",
UpdateLinks _
:=3, Editable:=True

End Sub







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
opening a file in Excel starts application but dose not open file Bob Shelton Excel Discussion (Misc queries) 1 July 2nd 08 07:51 PM
Opening file in Excel 2003 opens multipule instances of same file Ed_B Excel Discussion (Misc queries) 1 June 21st 07 07:10 PM
File:1 and File:2 -- Double Files when Opening One File dallin Excel Discussion (Misc queries) 1 January 25th 07 02:53 AM
opening an excel file opens a duplicate file of the same file skm Excel Discussion (Misc queries) 1 December 7th 05 05:52 PM


All times are GMT +1. The time now is 04:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"