FacilitiesCAD
Chemical
- Jun 25, 2003
- 46
Sub Macro1()
'
I've found alot of hints from reading these pages and I'm now trying to pull them together. I want to make an access database for all my autocad drawings on a shared drive. unfortunately I'm a little unfamiliar with alot of the process. The way i see to do it I have a few steps.
1) create and run a batch file (.bat) to make a text file of that lists all the drawings. The bat file is one line:
dir *.dwg /s >draw_lst.txt
the /s switch goes into all the subdirectories and the *.dwg gets only the autocad drawings
2)open the file draw_lst.txt into excell
I actually do this twice and save the excel file under 2 differnt names. (once to get the directory information and a second time to get file specific information like the date last saved and file name)
3) now I need to get the directory information connected with the file name. I tried to use record a macro and generic functions of end down to select everything needed and it didn't treat it just right. bellow is the macro.
Ideally it should go to the next row there is text in copy it then paste it in the next few rows there was text in unfortunately it copied the range as the actual range a7:a17 instead of the next group down.
there is one more problem to solve after this involving empty rows. Any Ideas appreciated
Thanks,
' Macro1 Macro
' Macro recorded 7/23/03 by Administrator
'
'
Selection.End(xlDown).Select
Selection.Copy
Selection.End(xlDown).Select
Range("A7:A17"
ActiveSheet.Paste
Selection.End(xlDown).Select
Selection.End(xlDown).Select
End Sub