Fixing a custom filter

Creating a macro - Writing a Script - Using the API

Fixing a custom filter

Postby gibsongk55 » Sat Jun 06, 2020 8:43 am

Hi,

I had someone create a custom filter with two dropdowns using criteria form a worksheet tab and macros. I recently had to had a new column, delete 2 columns then i added two more a few over to compensate for the same number of columns. Obviously that screwed it up and now the filter won't work. I copied the criteria worksheet to notepad before and after code. Then the same with the VB macros to two files. Then compared them with winmerge and they are all identical. Any idea to where i can find the problem to fix it?

Thanks for any input.


Gibs
OOo 4.1.X on MS Windows 7 UltimateX64, Open Office Calc
gibsongk55
 
Posts: 43
Joined: Sun Nov 30, 2008 12:44 am

Re: fixing a custom filter

Postby Villeroy » Sat Jun 06, 2020 10:30 am

You are the one and only developer of your application. We have no clue what you are trying to do with that procedure.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28431
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: fixing a custom filter

Postby Zizi64 » Sat Jun 06, 2020 10:38 am

VB macros


Are you using the Excel?
Or are those macros some StarBasic+API macros?
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.5;AOO4.1.7
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 9429
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Fixing a custom filter

Postby gibsongk55 » Sat Jun 06, 2020 2:04 pm

No I am using openoffice calc. I have two dropdowns for filtering that works with a criteria worksheet in another tab and also with the VB macros. Like i said I used winmerge to check all this data and it's all the same. No difference.

Everything I checked seems the same between the original spreadsheet and the current one only difference like i said I changed some columns.

I even clicked on the drop downs and checked data filter -- advanced filter and validity all have the same criteria. I don't know where else to look that the columns change is affecting it. The guy that wrote it is unavailable so I don't know. Guess i could try and hire someone else.


Gibs
OOo 4.1.X on MS Windows 7 UltimateX64, Open Office Calc
gibsongk55
 
Posts: 43
Joined: Sun Nov 30, 2008 12:44 am

Re: Fixing a custom filter

Postby Villeroy » Sat Jun 06, 2020 2:18 pm

After deleting columns, any reference to the deleted column is lost. You have to create new references. Next time you replace cell contents which raises another set of problems when the height of the data range changes.
A spreadsheet can't compete with a database, no matter how much macro code you throw at it. Possibly, the developer of your spreadsheet solution did not take into account that sheet columns can be deleted by users.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28431
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Fixing a custom filter

Postby gibsongk55 » Sat Jun 06, 2020 2:33 pm

I understand that. The VB code wouldn't change when i deleted and added columns. The columns that are filtering are still in the same place. The data range is also the same. So there must be something i am missing that was affected just not sure where.
OOo 4.1.X on MS Windows 7 UltimateX64, Open Office Calc
gibsongk55
 
Posts: 43
Joined: Sun Nov 30, 2008 12:44 am

Re: Fixing a custom filter

Postby Villeroy » Sat Jun 06, 2020 3:11 pm

More than 20 years ago, I caused a severe loss of money with such an "Excel solution" because someone deleted rows where I did not expect anyone to delete rows. Thousands of clients received the invoices of some other client then. It is too easy to break things when you try to develop something without actually developing anything.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28431
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 4 guests