+ Reply to Thread
Results 1 to 3 of 3

macro programing

  1. #1
    Registered User
    Join Date
    04-19-2010
    Location
    zurich, switzerland
    MS-Off Ver
    Excel 2007
    Posts
    1

    macro programing

    I would like to get in contact with a VBA expert. I have a monster page of excel and would like to automate it, I recorded a macro which works OK, with limitations - it would be easy for somebody with a better knowledge than mine - to make it fly....

    Here is the Macro.....

    Application.Run "try_417.xlsm!Macro2"
    With ActiveSheet.QueryTables.Add(Connection:= _
    "TEXT;C:\Documents and Settings\n evo 55\Desktop\nasdq5\NANO.csv", Destination _
    :=Range("$B$11"))
    .Name = "NANO" [
    .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)
    .TextFileTrailingMinusNumbers = True
    .Refresh BackgroundQuery:=False
    End With
    ActiveWindow.Panes(3).Activate
    Range("N82:U82").Select
    Selection.Copy
    Sheets("Sheet1").Select
    Range("B1").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Sheets("SII").Select
    ActiveWindow.Panes(1).Activate
    Range("B11").Select

    The questions:

    Line #3 of the Macro - How this data "NANO".csv can be merged and/or filled in from a separate sheet of data and cycled thrue. The macro should grab the data from a data sheet LOOP IT, go to the next line LOOP IT etc... be it 50 lines or 1,000 lines

    Start with;

    NANO
    NANP
    NANR
    NANS
    NANT
    .....
    ......

    and end with something like

    XXXX

    Easier, start with cell A1 and stop at cell A1000

    What is the trick, how do you do it?????

    Many thanks in advance
    Eva

  2. #2
    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: macro programing

    Welcome to the forum.

    Please take a few minutes to read the forum rules, then edit your post to add CODE tags and amend your thread title accordingly.

    Thanks.
    Last edited by shg; 04-19-2010 at 05:48 PM.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: macro programing

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to 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