Solved

Add headings to new entries on output to text file

Posted on 2014-11-28
8
82 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 46

Expert Comment

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

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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 46

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 46

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now