Solved

Add headings to new entries on output to text file

Posted on 2014-11-28
8
80 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 45

Expert Comment

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

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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 45

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 45

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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VBA to format 3 80
Help in WHSCRIPT 9 41
Opening Remote & Local Data Connection 2 41
MsgBox 2 37
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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.
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…

706 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

18 Experts available now in Live!

Get 1:1 Help Now