Solved

Add headings to new entries on output to text file

Posted on 2014-11-28
8
85 Views
Last Modified: 2014-11-28
In the attached project, I have the FlexGrid giving an output to a text file that lists a group of websites.  In order to make the list more organized, I would like to list all new sites added to the text file by giving them a simalar heading as the previous sections.  ie. ;ALLOW_MISCELLANEOUS_r11-27-2014  based on date.

Thank you
CB.zip
0
Comment
Question by:al4629740
  • 4
  • 4
8 Comments
 
LVL 47

Expert Comment

by:Martin Liss
ID: 40470547
Ok, be back soon.
0
 
LVL 47

Expert Comment

by:Martin Liss
ID: 40470639
This update includes
New code to add a header (only one per day) when new websites are added
Corrected a bug where when clicking the Export button the  "Changes have been made to the list..." messagebox was being  displayed, preventing the change from being saved.
Corrected a bug where if an unexpected error were to happen in the cmdImport sub, an infinite loop would result.
Added code to scroll to the top of the grid on startup
Corrected a bug where if the top two grid rows were deleted an error would occur
Corrected a bug where some changes were not being saved
Improved the positioning of the textbox
Q-28571164.zip
0
 

Author Comment

by:al4629740
ID: 40470700
Thank you so much.  I will test it when I get home.  I did notice the export dialog box as an issue also.  Thanks for making all these corrections
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:al4629740
ID: 40470824
Martin,

I am having issues in the attached file.  After I click Import, the other buttons stay disabled.  Also, when I put in a test site, the output was:

;ALLOW_MISCELLANEOUS_r11-28-2014
^(.*\.)?\.$
Q-28571164.zip
0
 
LVL 47

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 40470939
There was a bug introduced when I added the scroll to the top on startup. After cleaning up the file so that it looked like the following and correcting the bug all was well.

allowed.hsd1.il.comcast.net
^(.*\.)?hsd1.il.comcast.net$
;
ALLOW_DROPBOX_r05-02-2013
^db\.tt$
^(.*\.)?newdropbox\.com$
^(.*\.)?dropboxusercontent\.com$
;
;ALLOW_FACEBOOK_r02-31-2013
^fb\.me$
^(.*\.)?facebook\.com$
^(.*\.)?facebook\.net$
^(.*\.)?fbcdn\.com$
^(.*\.)?fbcdn\.net$
;
;ALLOW_TWITTER_r02-28-2013
^t\.co$
^(.*\.)?twimg\.com$
^(.*\.)?twitter\.com$
;
;ALLOW_YOUTUBE_r11-05-2012
^(.*\.)?youtube\.com$
^(.*\.)?youtube-nocookie\.com$
^(.*\.)?ytimg\.com$
^(.*\.)?googlevideo\.com$
;ALLOW_YOUTUBE_OPTIONAL
^(.*\.)?wix\.com$
^(.*\.)?infusionsoft\.com$
^(.*\.)?msexchange\.org$
^(.*\.)?google\.com$
^(.*\.)?googleusercontent\.com$
^(.*\.)?craigslist\.org$
^(.*\.)?microsoftonline\.com$
^(.*\.)?weebly\.com$
^(.*\.)?yahoo\.com$
^(.*\.)?another\.com$
Q-28571164-2.zip
0
 

Author Comment

by:al4629740
ID: 40470970
Martin,

Try it with the attached allowed.txt file.  Here is what I do.

I add test.com and push enter to accept
Then Export

It gives this output where test.com does not appear, but rather a blank

allowed.hsd1.il.comcast.net
^(.*\.)?hsd1.il.comcast.net$
;
ALLOW_DROPBOX_r05-02-2013
^db\.tt$
^(.*\.)?newdropbox\.com$
^(.*\.)?dropboxusercontent\.com$
;
;ALLOW_FACEBOOK_r02-31-2013
^fb\.me$
^(.*\.)?facebook\.com$
^(.*\.)?facebook\.net$
^(.*\.)?fbcdn\.com$
^(.*\.)?fbcdn\.net$
;
;ALLOW_TWITTER_r02-28-2013
^t\.co$
^(.*\.)?twimg\.com$
^(.*\.)?twitter\.com$
;
;ALLOW_YOUTUBE_r11-05-2012
^(.*\.)?youtube\.com$
^(.*\.)?youtube-nocookie\.com$
^(.*\.)?ytimg\.com$
^(.*\.)?googlevideo\.com$
;ALLOW_YOUTUBE_OPTIONAL
^(.*\.)?wix\.com$
^(.*\.)?infusionsoft\.com$
^(.*\.)?msexchange\.org$
^(.*\.)?google\.com$
^(.*\.)?googleusercontent\.com$
^(.*\.)?craigslist\.org$
^(.*\.)?microsoftonline\.com$
^(.*\.)?weebly\.com$
^(.*\.)?yahoo\.com$
^(.*\.)?another\.com$
^(.*\.)?\.$
^(.*\.)?\.$
^(.*\.)?\.$
^(.*\.)?\.$
^(.*\.)?aaaaaaaaaaaaaaaaaaaaaaaa\.com$
;ALLOW_MISCELLANEOUS_r11-28-2014
^(.*\.)?\.$
allowed.txt
0
 
LVL 47

Expert Comment

by:Martin Liss
ID: 40471007
...and push enter to accept
While that's a perfectly reasonable thing to do, I never actually did that. I always either selected another row after entering the new website or directly clicked Export after I finished typing. I'm sure I can make that work but try one of the other two ways and see if it works for you.
0
 

Author Comment

by:al4629740
ID: 40471010
Yes, that works.

I will open another question to have the enter function
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question