Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Add headings to new entries on output to text file

Posted on 2014-11-28
8
Medium Priority
?
93 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 49

Expert Comment

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

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
Technology Partners: 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 49

Accepted Solution

by:
Martin Liss earned 2000 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 49

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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

730 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