Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Another Simple Error - More Info

Who asked that?

--
Regards,
Tom Ogilvy

"Jim Cone" wrote in message
...
Setting the "Take Focus on Click" property to False,
allows the activeX CommandButton to work in XL97.



"Jim Cone" wrote in message
...
Jim,

Your final code doesn't work for me.
For one thing, "ScreenUpdating" should be Application.ScreenUpdating.

Here is my reponse to your previous message, I think it still applies...

In addition to Chip Pearson's recommendation,
the following two changes allowed it to work for me...

1. Change the Button to one from the forms toolbar.
Why?
2. Change the SourceRange to two rows from one row.
Unless you do that you just get the same data repeated.
3. Make sure the i variable is at least 6, or you won't have
enough rows in which to place the filled data...

'---------------------------------------------
Sub FillTest2()
Dim SourceRange As Excel.Range
Dim FillRange As Excel.Range
Dim response
Dim newWO, i, j As Integer

response = InputBox("Enter the number of WO's you want to create")
Application.ScreenUpdating = False

Sheets("Power Units").Activate
i = (response - 2) * 0.4
If i < 6 Then i = 6

With Worksheets("Power Units")
Set SourceRange = .Range("A3:AV4")
Set FillRange = .Range(.Cells(3, 1), .Cells(i, 48))
SourceRange.AutoFill Destination:=FillRange
End With

Application.ScreenUpdating = True

End Sub
'-------------------------------------------

Regards,
Jim Cone
San Francisco, USA




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
#VALUE Error should be simple fix Mykull Excel Discussion (Misc queries) 4 May 5th 09 11:19 PM
Extracting info from one col. and combining it with a simple formu Eqa Excel Discussion (Misc queries) 3 January 7th 08 02:32 AM
Another simple error... Jim Berglund Excel Programming 4 February 14th 05 08:01 PM
Simple #DIV/0! error AMY Z. Excel Worksheet Functions 2 January 23rd 05 10:25 PM
Simple INT error? Roger[_7_] Excel Programming 8 October 6th 03 09:19 AM


All times are GMT +1. The time now is 02:49 AM.

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

About Us

"It's about Microsoft Excel"