View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
ALEX ALEX is offline
external usenet poster
 
Posts: 493
Default Simple VBA code not working on new laptop

It was my typo below. I typed x1. The code is actually xl so that has
nothing to do with why the code isn't working. It must have something to do
with a laptop setting??? Any other ideas? Thanks.

"Don Guillett" wrote:

Maybe yes /maybe no. What about a blank at cell b1?

--
Don Guillett
SalesAid Software

"Duke Carey" wrote in message
...
On top of the other responses:

This line of code

Range("A1").currentregion.copy

can replace ALL of these lines

Range("A1").Select
Range(Selection, Selection.End(x1ToRight)).Select
Range(Selection, Selection.End(x1down)).Select
Selection.Copy


"Alex" wrote:

I have the following code that is working fine on my PC, but I just got a
new
laptop and it stops working on the line "ActiveSheet.Paste". I don't
know
where to begin to look. Security is set to low. Thanks for your help.

Sub OpOutOfSequence()

Range("A1").Select
Range(Selection, Selection.End(x1ToRight)).Select
Range(Selection, Selection.End(x1down)).Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste