none
Newbe For VBA RRS feed

  • Question

  • Hi Guys, 

    I work as a Data Analyst, i encountered with VBA while ago, and i am so new for VBA but i really needed to learn. What is the best way to learn VBA. Need some Tips.

    Wednesday, July 3, 2013 6:50 PM

All replies

  • Buy a good book - John Walkenbach's "Excel XXXX Power Programming with VBA" is my favorite.
    • Proposed as answer by James Cone Thursday, July 4, 2013 3:53 AM
    Wednesday, July 3, 2013 7:32 PM
  • thank you , i was wondering is there any class i can take aswell .
    Monday, July 8, 2013 5:04 PM
  • Search Youtube for Excel VBA macro and whatever topic you are interested in.

    Personally, I think classes are not a useful as determining a project that you want to do, and then diving in and doing it. Use your macro recorder, Walkenbach's book, and post here when you run into problems or need clarification.

    Monday, July 8, 2013 5:07 PM
  • i  am trying to implement SQL in VBA to extract the data from database and have no idea how should start learning it.

    Thank You

    Monday, July 8, 2013 7:49 PM
  • Google  "Youtube Excel VBA SQL" and poke around.
    Monday, July 8, 2013 8:21 PM
  • Thank you very much Bernie, i was wondering can we change rows into the column in pivot..i tried to do that but it didn't work out.
    Tuesday, July 9, 2013 3:17 PM
  • Change the names in the two spots....

    ActiveSheet.PivotTables("PivotTableName").PivotFields("RowFieldName").Orientation = xlColumnField

    Tuesday, July 9, 2013 3:45 PM
  • and where should i make the changes?

    Tuesday, July 9, 2013 6:43 PM
  • PivotTableName  should be whatever your pivot table is named, and

    RowFieldName should be whatever row field you are trying to move to a column field.

    Try recording a macro....

    Tuesday, July 9, 2013 7:12 PM
  •     no_of_cols = rs.Fields.Count
        'i = 1
        For j = 1 To no_of_cols
            Cells(1, j + 25) = rs.Fields(j - 1).Name
            Cells(1, j + 25).Font.Bold = True
            'i = i + 1

    can you please this code to me.
    Thank You very much

    Wednesday, July 10, 2013 5:42 PM
  • Hello ,
     Since i am very new for VBA i am getting encounter with some problem at my work. This is a what i am trying to do, I have to run some sql queires in VBA, while the worksheet gets populate in the data from database by running sql in VBA , i have to auto populate my other tab which are in same excel work book, this is what i am struggling with these days. I am desperately looking forward to hear from someone ASAP.
    Thank you very much.
    • Edited by kumar Shrestha Wednesday, July 24, 2013 2:25 PM un wanted, sentence
    Wednesday, July 24, 2013 1:01 AM
  •  This is the code you gave me

    ActiveSheet.PivotTables("PivotTableName").PivotFields("RowFieldName").Orientation = xlColumnField

     and this is the code i tried

    Sub Itmeized_data_pivot()
    ActiveSheet.PivotTables("Itemized Data Pivot").PivotFields("INT_AMT").Orientation = "INT_AMT"
    End Sub

    but i got the message

    Run Time error'1004': unable to get the Pivot Tables property of the work sheet class

    I tired to google the error but wasn't able to get the useful solution.

    Friday, July 26, 2013 4:38 AM