Hi everybody -

I am hoping someone can help me out with a problem that I am having.
I am trying to edit a macro, but I do not have a lot of experience
writing macros and I cannot figure out the issue.
I have a spreadsheet with a macro that does some formatting and
refreshes a pivot table in a different tab.  Everything works fine,
except one of the fields that is part of the pivot table is a text
field, where people enter descriptions/explanations.  I do not want to
restrict the amount of text that they can enter (unfortunately), I am
simply trying to resize column B in the pivot table tab to a width of
50 after the table is refreshed.
I have tried a few different things to get the column resized, and
everything that I try to do ends up resizing all of the columns in the
pivot table tab to 50, which is definitely what I do not want.  What
am I doing wrong?
A copy of my macro is below.  Any assistance would be greatly
appreciated.


Sub Process_new_data_entry()
'
' Keyboard Shortcut: Ctrl+p
'
    Selection.Sort Key1:=Range("A2"), Order1:=xlAscending,
Header:=xlGuess, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
    ActiveWindow.SelectedSheets.Visible = False
    Range("A5").Select
    ActiveSheet.PivotTables("PivotTable1").RefreshTable
    Selection.Sort Order1:=xlAscending, Type:=xlSortLabels,
OrderCustom:=1, _
        Orientation:=xlTopToBottom
    Sheets(" Fed Fund Daily Recap").Select
End Sub

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 7000 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

Reply via email to