Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Working with a WK1 format...

Thank you,

In the mean time I came up with this, it's very crude, but appears to
work...

Sub First()
Sheets("Lode").Select
Range("A1:D3500").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("A1").Select
Sheets("Cougar").Select
Application.Dialogs(xlDialogOpen).Show arg1:="H:\US Cable\*.WK1"

Range("A1:D3500").Select
Selection.Copy
Application.ActiveWindow.Close "YES"
SENDKEYS "{Enter}", False
ActiveWindow.ActivatePrevious

Sheets("Lode").Select
Range("A1").Select
ActiveSheet.Paste
Range("A1").Select
Sheets("Cougar").Select
Range("A1").Select

ActiveWindow.ActivatePrevious
Application.CutCopyMode = False
'ActiveWorkbook.Close
ActiveWindow.WindowState = xlMaximized

End Sub



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Working with a WK1 format...

Randy,

If it works its great.

But you can make it better.

Learn to eliminate "Select", makes the code simpler and faster
And unless you did a copy somewhere before this, don't know why you need
Application.CutCopyMode = False
Use it after the paste.

Sheets("Lode").Select
Range("A1:D3500").Select
Application.CutCopyMode = False
Selection.ClearContents

Might be replaced with
Sheets("Lode").Range("A1:D3500").ClearContents

And you can copy and paste real easy
Workbooks("wb1").Sheets("Sheet1").Range("A1:D3500" ).Copy _
Destination:=Workbooks("wb2").Sheets("Sheet1").Ran ge("A1")
(make your substitutes for wb1, wb2, Sheet1)
If its in the same workbook than you don't need to have the Workbooks part.

steve

"Randy Schwanke" wrote in message
...
Thank you,

In the mean time I came up with this, it's very crude, but appears to
work...

Sub First()
Sheets("Lode").Select
Range("A1:D3500").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("A1").Select
Sheets("Cougar").Select
Application.Dialogs(xlDialogOpen).Show arg1:="H:\US Cable\*.WK1"

Range("A1:D3500").Select
Selection.Copy
Application.ActiveWindow.Close "YES"
SENDKEYS "{Enter}", False
ActiveWindow.ActivatePrevious

Sheets("Lode").Select
Range("A1").Select
ActiveSheet.Paste
Range("A1").Select
Sheets("Cougar").Select
Range("A1").Select

ActiveWindow.ActivatePrevious
Application.CutCopyMode = False
'ActiveWorkbook.Close
ActiveWindow.WindowState = xlMaximized

End Sub



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Working with a WK1 format...

Thank you for the tips and suggestions, and you are very correct, I can
certainly make it better, I agree.

I'll review what you had indicated and certainly will try do those,
being new to this all, I'm at a disadvantage, but at least I try to
attain what I need, crude though it might be...

Thanks again,

Randy



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Conditional Format Not Working sly411 Excel Discussion (Misc queries) 0 May 20th 10 02:08 PM
DATE FORMAT NOT WORKING CarolAn Excel Worksheet Functions 5 October 6th 09 09:46 PM
Conditional Format Not Working roxiemayfield Excel Worksheet Functions 4 December 6th 07 07:42 PM
Number Format not working Wanna Learn Excel Discussion (Misc queries) 4 August 10th 07 12:26 PM
Date Format Not Working GirafeLady Excel Worksheet Functions 5 August 28th 06 08:21 PM


All times are GMT +1. The time now is 03:04 AM.

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"