Avatar of Ted Penner
Ted Penner
Flag for United States of America asked on

Code clean

Hats off to Dave for all the assistance with this. What we have now is amazing!

I am looking to clean up the code used in the v5 workbook here a little https://www.experts-exchange.com/askQuestion.jsp?taid=604.  I would prefer to have as many one or two line descriptors to state the purpose of each major block of code as needed, and have appropriate names in the modules "if" more than one module is required. Ideally, I'd like to have only one module to reference all the code but if there are some technical reasons why this isn't possible, then that is OK. The bottom line is that I would like to be able to tell what each section of code does, a little easier than I can currently.

Note that it is also no longer necessary to remove any columns during the import function. The following columns should all be shown depending on their availability in the following two types of exports, and should not have been coded to be removed. The section of code that removes the columns, can be deleted:

Live Trading Export – Trade History Columns
Exec Time | Spread | Side | Qty | Symbol | Exp | Strike | Type | Price | Net Price | Order Type

Paper Money Export - Trade History Columns
Order ID | Exec Time | Spread | Side | Pos Effect | Qty | Symbol | Exp | Strike| Net Price | Order Type

Thank you sir!
Microsoft Excel

Avatar of undefined
Last Comment
Ted Penner

8/22/2022 - Mon
dlmille

There aren't enough lines to require having more than one module.  However, for debugging purposes and general understanding, grouping subroutines and functions under a common, related module is a better practice than lumping all the routines in one module.

As a result, I've named the modules, after adding documentation to the code - at the top and inside the code, to ease debugging that may be required in future.

The columns you have been documented are allowed entry into the sheet, and logic has been added to select the appropriate columns in the InsertPostion based on selection code, re: checking/unchecking trades that make up a position.

See attached.

Dave
2.28-select-movable-trades-r61.xlsm
Ted Penner

ASKER
Fantastic!  We missed one column and some adjustment to ease view-ability needs to be made.  Here is a video on what I noticed http://screencast.com/t/ib9wWWv3.  I am forming the column documentation now on what needs to be moved over. It should be relatively straight forward and will be posted in a subsequent question.
ASKER CERTIFIED SOLUTION
dlmille

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Ted Penner

ASKER
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck