ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Code Termintes (https://www.excelbanter.com/excel-programming/382037-code-termintes.html)

Jason

Code Termintes
 
Greetings,

Below are a couple of lines from some code I am running. When the code
reaches the Autofill line, it runs the code (autofill takes place), but then
the code just stops (doesn't proceed to the next line of code) and reverts
back to the beginning of the sub. I've tried stepping through this, so I
know exactly where it is happening, but I can't figure out why? I have the
same type type of code in a different workbook and it works fine. Any ideas?
Thanks.

Range("X2:AO2").Select
Selection.AutoFill Destination:=Range("X2:AO1000")

Don Guillett

Code Termintes
 
I just tested your code, as written to 2000 and it worked fine but this idea
might be better.

Sub filldown()
Range("x2:ao2").AutoFill Range("x2:ao1000")
End Sub

--
Don Guillett
SalesAid Software

"Jason" wrote in message
...
Greetings,

Below are a couple of lines from some code I am running. When the code
reaches the Autofill line, it runs the code (autofill takes place), but
then
the code just stops (doesn't proceed to the next line of code) and reverts
back to the beginning of the sub. I've tried stepping through this, so I
know exactly where it is happening, but I can't figure out why? I have
the
same type type of code in a different workbook and it works fine. Any
ideas?
Thanks.

Range("X2:AO2").Select
Selection.AutoFill Destination:=Range("X2:AO1000")




JNW

Code Termintes
 
Do you have a worksheet change event that runs, or something similar?

If so you'll need to add
application.enableevents = false
before the lines then
application.enableevents = true
after.
--
JNW


"Jason" wrote:

Greetings,

Below are a couple of lines from some code I am running. When the code
reaches the Autofill line, it runs the code (autofill takes place), but then
the code just stops (doesn't proceed to the next line of code) and reverts
back to the beginning of the sub. I've tried stepping through this, so I
know exactly where it is happening, but I can't figure out why? I have the
same type type of code in a different workbook and it works fine. Any ideas?
Thanks.

Range("X2:AO2").Select
Selection.AutoFill Destination:=Range("X2:AO1000")


Wei Lu [MSFT]

Code Termintes
 
Hi ,

How is everything going? Please feel free to let me know if you need any
assistance.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



All times are GMT +1. The time now is 11:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com