A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Error 1004



 
 
Thread Tools Display Modes
  #1  
Old November 11th, 2009, 04:29 PM posted to microsoft.public.excel.misc
tpeter
external usenet poster
 
Posts: 49
Default Error 1004

I am attempting to make a dynamic Histogram and chart. I have recorded the
macro but when I run it the macro breaks and gives me the above error saying
ATPVBAEN.XLA cant be found. I have tried it with the empty sheet there and
with no extra tab. Thank you for your help.

Tim Peter
  #2  
Old November 11th, 2009, 04:56 PM posted to microsoft.public.excel.misc
Pete_UK
external usenet poster
 
Posts: 8,780
Default Error 1004

Have you installed the Analysis ToolPak? This is included within
XL2007, but on earlier versions you need to install it - check XL Help
on how to do this.

Hope this helps.

Pete

On Nov 11, 4:29*pm, tpeter wrote:
I am attempting to make a dynamic Histogram and chart. I have recorded the
macro but when I run it the macro breaks and gives me the above error saying
ATPVBAEN.XLA cant be found. I have tried it with the empty sheet there and
with no extra tab. Thank you for your help.

Tim Peter


  #3  
Old November 11th, 2009, 04:59 PM posted to microsoft.public.excel.misc
Mike H
external usenet poster
 
Posts: 8,419
Default Error 1004

Post the code or at least the line it breaks on

"tpeter" wrote:

I am attempting to make a dynamic Histogram and chart. I have recorded the
macro but when I run it the macro breaks and gives me the above error saying
ATPVBAEN.XLA cant be found. I have tried it with the empty sheet there and
with no extra tab. Thank you for your help.

Tim Peter

  #4  
Old November 11th, 2009, 05:31 PM posted to microsoft.public.excel.misc
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Error 1004

'Check out the below link
http://support.microsoft.com/default.aspx/kb/192642

Make sure you have loaded Analysis ToolPak - VBA. from ToolsAdd-Ins
In case you are using 2007
(http://office.microsoft.com/en-us/ex...215691033.aspx)


If this post helps click Yes
---------------
Jacob Skaria


"tpeter" wrote:

I am attempting to make a dynamic Histogram and chart. I have recorded the
macro but when I run it the macro breaks and gives me the above error saying
ATPVBAEN.XLA cant be found. I have tried it with the empty sheet there and
with no extra tab. Thank you for your help.

Tim Peter

  #5  
Old November 11th, 2009, 06:38 PM posted to microsoft.public.excel.misc
tpeter
external usenet poster
 
Posts: 49
Default Error 1004

I am running 2003. The toolpack is installed, I recorded a macro and then
tried to get it to run as a check and then I got the initial error. Here is
the code, it breaks as soon as it starts running:

Sub His()
'
' His Macro
' Macro recorded 11/11/2009 by tpeter
'

'
Application.Run "ATPVBAEN.XLA!Histogram", , "", , True, False, True, _
False
ActiveWindow.SmallScroll Down:=-6
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 1").ScaleWidth 1.91, msoFalse,
msoScaleFromTopLeft
ActiveSheet.Shapes("Chart 1").ScaleHeight 3.3, msoFalse,
msoScaleFromTopLeft
ActiveChart.SeriesCollection(1).XValues = "=Sheet3!R2C1:R242C1"
ActiveChart.SeriesCollection(1).Values = "=Sheet3!R2C2:R242C2"
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 230
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 229
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 228
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 226
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 221
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 216
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 212
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 207
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 201
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 186
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 177
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 167
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 159
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 140
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 133
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 124
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 118
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 112
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 101
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 96
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 92
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 89
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 84
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 82
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 78
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 75
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 70
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 67
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 65
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 62
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 54
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 50
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 45
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 41
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 31
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 25
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 16
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 5
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 1
ActiveChart.PlotArea.Select
With Selection.Border
.ColorIndex = 16
.Weight = xlThin
.LineStyle = xlContinuous
End With
With Selection.Interior
.ColorIndex = 2
.PatternColorIndex = 1
.Pattern = xlSolid
End With
ActiveChart.ChartArea.Select
ActiveChart.HasLegend = False
ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
.MinimumScaleIsAuto = True
.MaximumScaleIsAuto = True
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLogarithmic
.DisplayUnit = xlNone
End With
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 1").ScaleWidth 1.33, msoFalse,
msoScaleFromTopLeft
End Sub

Thanks for all of your help.

"Pete_UK" wrote:

Have you installed the Analysis ToolPak? This is included within
XL2007, but on earlier versions you need to install it - check XL Help
on how to do this.

Hope this helps.

Pete

On Nov 11, 4:29 pm, tpeter wrote:
I am attempting to make a dynamic Histogram and chart. I have recorded the
macro but when I run it the macro breaks and gives me the above error saying
ATPVBAEN.XLA cant be found. I have tried it with the empty sheet there and
with no extra tab. Thank you for your help.

Tim Peter


.

  #6  
Old November 11th, 2009, 07:15 PM posted to microsoft.public.excel.misc
Dave Peterson
external usenet poster
 
Posts: 19,791
Default Error 1004

When I did this manually, I got ranges passed to the line of code:

Application.Run "ATPVBAEN.XLA!Histogram", ActiveSheet.Range("$C$16:$C$31"), _
ActiveSheet.Range("$M$16:$M$24"), ActiveSheet.Range("$D$16:$D$31"), True, _
False, False, False

The parms are in this order:

inprng
outrng
binrng
pareto
chartc
chart
labels

I don't know what sheet you're using or the ranges that you need, but maybe you
can plug your ranges (and other choices) into that line of code.



tpeter wrote:

I am running 2003. The toolpack is installed, I recorded a macro and then
tried to get it to run as a check and then I got the initial error. Here is
the code, it breaks as soon as it starts running:

Sub His()
'
' His Macro
' Macro recorded 11/11/2009 by tpeter
'

'
Application.Run "ATPVBAEN.XLA!Histogram", , "", , True, False, True, _
False
ActiveWindow.SmallScroll Down:=-6
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 1").ScaleWidth 1.91, msoFalse,
msoScaleFromTopLeft
ActiveSheet.Shapes("Chart 1").ScaleHeight 3.3, msoFalse,
msoScaleFromTopLeft
ActiveChart.SeriesCollection(1).XValues = "=Sheet3!R2C1:R242C1"
ActiveChart.SeriesCollection(1).Values = "=Sheet3!R2C2:R242C2"
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 230
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 229
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 228
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 226
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 221
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 216
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 212
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 207
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 201
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 186
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 177
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 167
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 159
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 140
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 133
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 124
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 118
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 112
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 101
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 96
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 92
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 89
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 84
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 82
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 78
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 75
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 70
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 67
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 65
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 62
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 54
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 50
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 45
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 41
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 31
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 25
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 16
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 5
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 1
ActiveChart.PlotArea.Select
With Selection.Border
.ColorIndex = 16
.Weight = xlThin
.LineStyle = xlContinuous
End With
With Selection.Interior
.ColorIndex = 2
.PatternColorIndex = 1
.Pattern = xlSolid
End With
ActiveChart.ChartArea.Select
ActiveChart.HasLegend = False
ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
.MinimumScaleIsAuto = True
.MaximumScaleIsAuto = True
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLogarithmic
.DisplayUnit = xlNone
End With
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 1").ScaleWidth 1.33, msoFalse,
msoScaleFromTopLeft
End Sub

Thanks for all of your help.

"Pete_UK" wrote:

Have you installed the Analysis ToolPak? This is included within
XL2007, but on earlier versions you need to install it - check XL Help
on how to do this.

Hope this helps.

Pete

On Nov 11, 4:29 pm, tpeter wrote:
I am attempting to make a dynamic Histogram and chart. I have recorded the
macro but when I run it the macro breaks and gives me the above error saying
ATPVBAEN.XLA cant be found. I have tried it with the empty sheet there and
with no extra tab. Thank you for your help.

Tim Peter


.


--

Dave Peterson
  #7  
Old November 11th, 2009, 09:06 PM posted to microsoft.public.excel.misc
tpeter
external usenet poster
 
Posts: 49
Default Error 1004

Thanks Dave, I looked and the vba toolpack wasn't installed, now it works.

"Dave Peterson" wrote:

When I did this manually, I got ranges passed to the line of code:

Application.Run "ATPVBAEN.XLA!Histogram", ActiveSheet.Range("$C$16:$C$31"), _
ActiveSheet.Range("$M$16:$M$24"), ActiveSheet.Range("$D$16:$D$31"), True, _
False, False, False

The parms are in this order:

inprng
outrng
binrng
pareto
chartc
chart
labels

I don't know what sheet you're using or the ranges that you need, but maybe you
can plug your ranges (and other choices) into that line of code.



tpeter wrote:

I am running 2003. The toolpack is installed, I recorded a macro and then
tried to get it to run as a check and then I got the initial error. Here is
the code, it breaks as soon as it starts running:

Sub His()
'
' His Macro
' Macro recorded 11/11/2009 by tpeter
'

'
Application.Run "ATPVBAEN.XLA!Histogram", , "", , True, False, True, _
False
ActiveWindow.SmallScroll Down:=-6
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 1").ScaleWidth 1.91, msoFalse,
msoScaleFromTopLeft
ActiveSheet.Shapes("Chart 1").ScaleHeight 3.3, msoFalse,
msoScaleFromTopLeft
ActiveChart.SeriesCollection(1).XValues = "=Sheet3!R2C1:R242C1"
ActiveChart.SeriesCollection(1).Values = "=Sheet3!R2C2:R242C2"
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 230
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 229
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 228
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 226
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 221
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 216
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 212
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 207
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 201
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 186
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 177
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 167
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 159
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 140
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 133
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 124
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 118
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 112
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 101
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 96
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 92
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 89
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 84
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 82
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 78
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 75
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 70
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 67
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 65
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 62
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 54
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 50
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 45
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 41
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 31
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 25
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 16
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 5
Windows("Compiled w-0 425-630 n 800-1000.xls").ScrollRow = 1
ActiveChart.PlotArea.Select
With Selection.Border
.ColorIndex = 16
.Weight = xlThin
.LineStyle = xlContinuous
End With
With Selection.Interior
.ColorIndex = 2
.PatternColorIndex = 1
.Pattern = xlSolid
End With
ActiveChart.ChartArea.Select
ActiveChart.HasLegend = False
ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
.MinimumScaleIsAuto = True
.MaximumScaleIsAuto = True
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLogarithmic
.DisplayUnit = xlNone
End With
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 1").ScaleWidth 1.33, msoFalse,
msoScaleFromTopLeft
End Sub

Thanks for all of your help.

"Pete_UK" wrote:

Have you installed the Analysis ToolPak? This is included within
XL2007, but on earlier versions you need to install it - check XL Help
on how to do this.

Hope this helps.

Pete

On Nov 11, 4:29 pm, tpeter wrote:
I am attempting to make a dynamic Histogram and chart. I have recorded the
macro but when I run it the macro breaks and gives me the above error saying
ATPVBAEN.XLA cant be found. I have tried it with the empty sheet there and
with no extra tab. Thank you for your help.

Tim Peter

.


--

Dave Peterson
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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