Solved

Add headings to new entries on output to text file

Posted on 2014-11-28
8
90 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 48

Expert Comment

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

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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

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 48

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 48

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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

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 …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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
Course of the Month8 days, 11 hours left to enroll

615 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