Results 1 to 8 of 8

Thread: Code suggestions [Resolved]

Threaded View

  1. #7

    Thread Starter
    New Member
    Join Date
    Jan 2005
    Posts
    10

    Resolved Re: Code suggestions

    Thanks... Problem Solved

    VB Code:
    1. Sub Macro2()
    2.     Dim sCell As String
    3.     sCell = "A" & ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row + 1
    4.  
    5.     With ActiveSheet.QueryTables.Add(Connection:= _
    6.         "FINDER;C:\test\Query from MS Access Database.dqy" _
    7.         , Destination:=Range(sCell))
    8.         .Name = "Query from MS Access Database"
    9.         .FieldNames = False
    10.         .RowNumbers = False
    11.         .FillAdjacentFormulas = False
    12.         .PreserveFormatting = True
    13.         .RefreshOnFileOpen = False
    14.         .BackgroundQuery = True
    15.         .RefreshStyle = xlInsertDeleteCells
    16.         .SavePassword = True
    17.         .SaveData = True
    18.         .AdjustColumnWidth = True
    19.         .RefreshPeriod = 0
    20.         .PreserveColumnInfo = True
    21.         .Refresh BackgroundQuery:=False
    22.     End With
    23.     Cells.Select
    24.     Selection.Sort Key1:=Range("B1"), Order1:=xlAscending, Header:=xlGuess, _
    25.         OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
    26.         DataOption1:=xlSortNormal
    27. End Sub

    Now trying to figure out how to edit the original subject to resolved.
    Last edited by hatemachine; Jan 30th, 2005 at 09:57 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width