![]() |
Histogram and macros
I am needing to create a macro in which I want to use a histogram. When
I record the macro I select my input, bin and output ranges and everything works fine. But when I go to run the macro it asks me for the input range. I selected it when I recorded the macro. What am I doing wrong???? Thanks! --- Message posted from http://www.ExcelForum.com/ |
Histogram and macros
|
Histogram and macros
I think that's part of the problem (the macro). Here's the code:
Sub Macro5() ' ' Macro5 Macro ' Macro recorded 01/15/2004 by User ' ' Keyboard Shortcut: Ctrl+h ' Application.Run "ATPVBAEN.XLA!Histogram", , , , False, False, False, _ False End Sub I selected Analysis ToolPak - VBA for an add-in but still doesn't work. I'm sure it's something stupid on my part! THANKS! --- Message posted from http://www.ExcelForum.com/ |
Histogram and macros
I got this Macro from a site and want it to look at C:\Temp, any ideas?
i cant get it to work Sub ListFilesInFolder(SourceFolderName As String, IncludeSubfolders As Boolean) ' lists information about the files in SourceFolder ' example: ListFilesInFolder "C:\FolderName", True Dim FSO As Scripting.FileSystemObject Dim SourceFolder As Scripting.Folder, SubFolder As Scripting.Folder Dim FileItem As Scripting.File Dim r As Long Set FSO = New Scripting.FileSystemObject Set SourceFolder = FSO.GetFolder(SourceFolderName) r = Range("A65536").End(xlUp).Row + 1 For Each FileItem In SourceFolder.Files ' display file properties Cells(r, 1).Formula = FileItem.Path & FileItem.Name Cells(r, 2).Formula = FileItem.Size Cells(r, 3).Formula = FileItem.Type Cells(r, 4).Formula = FileItem.DateCreated Cells(r, 5).Formula = FileItem.DateLastAccessed Cells(r, 6).Formula = FileItem.DateLastModified Cells(r, 7).Formula = FileItem.Attributes Cells(r, 8).Formula = FileItem.ShortPath & FileItem.ShortName ' use file methods (not proper in this example) ' FileItem.Copy "C:\FolderName\Filename.txt", True ' FileItem.Move "C:\FolderName\Filename.txt" ' FileItem.Delete True r = r + 1 ' next row number Next FileItem If IncludeSubfolders Then For Each SubFolder In SourceFolder.SubFolders ListFilesInFolder SubFolder.Path, True Next SubFolder End If Columns("A:H").AutoFit Set FileItem = Nothing Set SourceFolder = Nothing Set FSO = Nothing ActiveWorkbook.Saved = True End Sub --- Message posted from http://www.ExcelForum.com/ |
Histogram and macros
sorry i got mixed up, could you send the xla file to me?
--- Message posted from http://www.ExcelForum.com/ |
Histogram and macros
|
Histogram and macros
Application.Run "ATPVBAEN.XLA!Histogram", , , , False, False,False,False
do you see a range in this statement anywhere?? - neither do I. Try rerecording. -- Regards, Tom Ogilvy "randysbug " wrote in message ... I think that's part of the problem (the macro). Here's the code: False, _ False Sub Macro5() ' ' Macro5 Macro ' Macro recorded 01/15/2004 by User ' ' Keyboard Shortcut: Ctrl+h ' Application.Run "ATPVBAEN.XLA!Histogram", , , , False, False, End Sub I selected Analysis ToolPak - VBA for an add-in but still doesn't work. I'm sure it's something stupid on my part! THANKS! --- Message posted from http://www.ExcelForum.com/ |
Histogram and macros
I am having the EXACT same problem in trying to create a macro to appl
to a histogram. I have re-recorded at least a dozen times and tried just about ever option. The only thing I thought of is that the input values are results o formulae and not direct cell entry. However, I did direct cell inpu and got the same results. The macro code is exactly the same as the first post by randysbu except I'm not using a shortcut. I plan to make it a worksheet even since my tables are being updated from another area of the workbook. Was this one solved and what was the solution? Thanks!! RHer -- Message posted from http://www.ExcelForum.com |
Histogram and macros
Does anyone have any suggestion or solution to this problem
-- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 08:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com