Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / March 2008

Tip: Looking for answers? Try searching our database.

Problem keeping data synchronised with database query.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RB - 14 Mar 2008 11:12 GMT
Hi all,

I'm using Excel 2003.

I have a spreadsheet containing a database query (inserted using
Data->Import External Data->New Database Query) with 5 columns. The 6th
column is a notes column, in which the user can type little comments to
help them.

When clicking "Refresh Data" on the data, I have a problem if a row is
deleted, because the Notes cell that was on that line is now inline with
the next row. I would prefer it if the notes cell was deleted entirely
(or, more specifically, if the entire row was deleted). Is this possible
in Excel 2003?

I've been through the 3 options in "Data Range Properties" for "If the
number of rows in the data range changes upon refresh", but none of them
will delete entire rows - only the cells in the data set.

I currently have it set to "Insert entire rows for new data, clear
unused cells.", and am using a Dictionary object in VBA to read in the
"Notes" values, then write them back out after the refresh is completed
- is there a better way?!

Cheers,

RB.
Billy Liddel - 14 Mar 2008 23:52 GMT
Hi
I'm just guessing, what happens if you delete all the data before a refresh?
I would imagine that all the would be downloaded. If that is so you could
clear the sheet before refresh.

Record a macro to refresh the data then before the generated code put the
lines

Dim addr As String
addr = Range("A1").CurrentRegion.Address
Range(addr).ClearContents

Hope this helps
Peter

> Hi all,
>
[quoted text clipped - 23 lines]
>
> RB.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.