#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
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
.

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
RT- error 1004 JMay Excel Discussion (Misc queries) 3 October 5th 08 02:58 PM
why am i getting an error 1004?? please help SAM SEBAIHI Excel Discussion (Misc queries) 2 February 16th 07 02:21 AM
Run time error 1004, General ODBC error [email protected] New Users to Excel 0 September 19th 05 01:41 AM
Runtime error '1004' General ODBC error star_lucas New Users to Excel 0 August 29th 05 04:09 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM


All times are GMT +1. The time now is 05:39 PM.

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"