Closed Thread
Results 1 to 3 of 3

New to macro, need advice, thanks

  1. #1
    Registered User
    Join Date
    02-15-2005
    Posts
    1

    Question New to macro, need advice, thanks

    Hi there to all you macros gurus!

    I'm new to macro using, so please forgive me if what i'm about to ask is out of the scope of this forum... or out of the scope of macro programming. i'm french so please forgive any errors on my english too...

    First a little project background:
    I am working on a project to deploy XP desktops over a 30.000 PCs network.
    We have 9 types of sites (different working tasks and applications) and 12 types of users profiles to combine on each site.
    I m in charge of all strategies and profiles administration as well. Each user has his desktop/start menu rebuilt on login according to the site and to his profile.
    Up to this, nothing special...

    But:
    I am looking for a way to check, on my test platform, the correct construction of the desktop environment for each profile. Beeing new on this project, i was wondering if excel's macros are able to perform such a task since it can interpret VBS, it should be able to check existing shortcuts, folders and files.

    My approch may seem a little vague, since like i told you i'm new to macros...

    The main goal is to obtain a complete report sheet on at least the start menus subfolders and files (shortcuts) with corresponding references to paths and executables to be able to check each profile on each site in a better way than actual manual way (click and check).

    I'd be willing to put some time and effort on devellopping such a macro if i was sure it could work and save me a lot of time on the testing platform at each new update/release of tecnical platform.

    thanks to tell me if that seems do-able, or if it has already been done before....

    Best regards to all

    i'll be checking this forum more deeply from now...

    Pierre JOUBERT

  2. #2
    Registered User
    Join Date
    03-14-2011
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: New to macro, need advice, thanks

    Greeting!

    I appreciate the helpful of this forum GURUS.

    I am trying to use the below macro to import two CSV files into a MASTER xls.

    I have 4 of these files daily that I need updated.

    Sub MergingReadsCSV()
    '
    ' MergingReadsCSV Macro
    '

    '
    Rows("1:1").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.QueryTable.Delete
    Selection.ClearContents
    Range("A1").Select
    With ActiveSheet.QueryTables.Add(Connection:= _
    "TEXT;C:\Documents and Settings\Josh\Desktop\3-15-11\ABC Read RUNNING thru 03-31-10 .csv" _
    , Destination:=Range("$A$1"))
    .Name = "ABC Read RUNNING thru 03-31-10 "
    .FieldNames = True
    .RowNumbers = False
    .FillAdjacentFormulas = False
    .PreserveFormatting = True
    .RefreshOnFileOpen = False
    .RefreshStyle = xlInsertDeleteCells
    .SavePassword = False
    .SaveData = True
    .AdjustColumnWidth = True
    .RefreshPeriod = 0
    .TextFilePromptOnRefresh = False
    .TextFilePlatform = 437
    .TextFileStartRow = 1
    .TextFileParseType = xlDelimited
    .TextFileTextQualifier = xlTextQualifierDoubleQuote
    .TextFileConsecutiveDelimiter = False
    .TextFileTabDelimiter = True
    .TextFileSemicolonDelimiter = False
    .TextFileCommaDelimiter = True
    .TextFileSpaceDelimiter = False
    .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
    .TextFileTrailingMinusNumbers = True
    .Refresh BackgroundQuery:=False
    End With
    Range(Selection, Selection.End(xlDown)).Select
    ActiveWindow.SmallScroll Down:=2
    Range("A20643").Select
    With ActiveSheet.QueryTables.Add(Connection:= _
    "TEXT;C:\Documents and Settings\Josh\Desktop\ -----(I WOULD LIKE THIS DATE TO BE TODAY's DATE) 3-15-11\ABC Read RUNNING thru (TODAY's DATE)03-15-11 .csv" _
    , Destination:=Range("$A$20643"))
    .Name = "ABC Read RUNNING thru 03-15-11 _1"
    .FieldNames = True
    .RowNumbers = False
    .FillAdjacentFormulas = False
    .PreserveFormatting = True
    .RefreshOnFileOpen = False
    .RefreshStyle = xlInsertDeleteCells
    .SavePassword = False
    .SaveData = True
    .AdjustColumnWidth = True
    .RefreshPeriod = 0
    .TextFilePromptOnRefresh = False
    .TextFilePlatform = 437
    .TextFileStartRow = 1
    .TextFileParseType = xlDelimited
    .TextFileTextQualifier = xlTextQualifierDoubleQuote
    .TextFileConsecutiveDelimiter = False
    .TextFileTabDelimiter = True
    .TextFileSemicolonDelimiter = False
    .TextFileCommaDelimiter = True
    .TextFileSpaceDelimiter = False
    .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
    .TextFileTrailingMinusNumbers = True
    .Refresh BackgroundQuery:=False
    End With
    ActiveWindow.SmallScroll Down:=12
    Rows("20643:20643").Select
    Selection.Delete Shift:=xlUp - THIS LINE IS ONLY BECAUSE I MERGED THE DATA WITH TABLE HEADINGS...THIS CAN BE ADJUSTED to import DATA without HEADINGS.
    Range("B28570:B28571").Select
    ChDir "C:\MYREPORTS"
    ActiveWorkbook.SaveAs Filename:= _
    "C:\MYREPORTS\ABC Read RUNNING thru 03-16-11.xlsm", FileFormat:= _
    xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
    ActiveWindow.SmallScroll Down:=-3
    Sheets("STUDENT SOURCE").Select
    ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
    End Sub

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: New to macro, need advice, thanks

    pma, please take a few minutes to read the forum rules, and then start your own thread with a descriptive title and your code enclosed in CODE tags.
    Entia non sunt multiplicanda sine necessitate

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1