Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
RefreshAll Data with VBA
Well, this should be my last question for a little while. I need t
create a button that refreshes all data on a specific sheet (we wil call it sheet1) I found this Worksheets(2).RefreshAll that is suppose to do just that. I just don't understand exactly how I specify m worksheet. The 2 is not the name of any of my sheets but doing little searching I found that it may be the Index property....I do no understand how I can determine the index property if that is indeed th case. Thanks for your help as always, any input would be greatl appreciated. Jason Sel -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
RefreshAll Data with VBA
I don't know where you found that code, but it raises an error for me. The
RefreshAll method is a method of the workbook, not the worksheet. If it would work, you would use Worksheets("Sheet2").RefreshAll to refer to a worksheet named Sheet2 If you have querytables on the sheet Dim qt as QueryTable for each qt in Worksheets("sheet2").QueryTables qt.Refresh BackgroundQuery:=False Next for pivot Tables Dim pt as PivotTable for each pt in Worksheets("Sheet2").PivotTables pt.RefreshTable Next Or if you just want to refresh the whole workbook Workbooks("Myfile.xls").RefreshAll -- Regards, Tom Ogilvy JasonSelf wrote in message ... Well, this should be my last question for a little while. I need to create a button that refreshes all data on a specific sheet (we will call it sheet1) I found this Worksheets(2).RefreshAll that is supposed to do just that. I just don't understand exactly how I specify my worksheet. The 2 is not the name of any of my sheets but doing a little searching I found that it may be the Index property....I do not understand how I can determine the index property if that is indeed the case. Thanks for your help as always, any input would be greatly appreciated. Jason Self --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
RefreshAll Data with VBA
I actually got that sippet of code from searching refreshall in the vb
help. Thanks for the help...doing that worked perfectly, Thanks -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ActiveWorkbook.RefreshAll | Excel Discussion (Misc queries) | |||
Data Entry Online, Data Format, Data Conversion and Data EntryServices through Data Entry Outsourcing | Excel Discussion (Misc queries) | |||
Problem with ThisWorkbook.RefreshAll | Excel Discussion (Misc queries) | |||
ActiveWorkbook.RefreshAll | Excel Discussion (Misc queries) | |||
ActiveWorkbook.RefreshAll | Excel Programming |