Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
We are moving data from a database to Excel. We need the Excel spreadsheet to
update as we make changes in the database. What I need is to put a 'button' on the spreadsheet that will refresh the data as we make changes in the database. I know I need to code it in VB. Can anyone lead in me in a direction? Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
you need to select a cell inside the query range..... Private Sub CommandButton1_Click() sheets("sheet1").activate Range("A2").QueryTable.Refresh BackgroundQuery:=False end sub regards FSt1 "cbrammer" wrote: We are moving data from a database to Excel. We need the Excel spreadsheet to update as we make changes in the database. What I need is to put a 'button' on the spreadsheet that will refresh the data as we make changes in the database. I know I need to code it in VB. Can anyone lead in me in a direction? Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
or more directly.....
Private Sub CommandButton1_Click() With Sheets("Sheet1").Range("A2") .QueryTable.Refresh BackgroundQuery:=False End With End Sub -- Regards, Nigel "FSt1" wrote in message ... hi you need to select a cell inside the query range..... Private Sub CommandButton1_Click() sheets("sheet1").activate Range("A2").QueryTable.Refresh BackgroundQuery:=False end sub regards FSt1 "cbrammer" wrote: We are moving data from a database to Excel. We need the Excel spreadsheet to update as we make changes in the database. What I need is to put a 'button' on the spreadsheet that will refresh the data as we make changes in the database. I know I need to code it in VB. Can anyone lead in me in a direction? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create refresh button in worksheet to refresh Pivot Table Data | Excel Worksheet Functions | |||
Command button to refresh data | Excel Programming | |||
Refresh Multiple Queries via a Command Button | Excel Programming | |||
Add a button to refresh a pivot in another tab of the same workbook | Excel Discussion (Misc queries) | |||
Refresh Button | Excel Worksheet Functions |