Solved

Print form "frmxxxx" names

Posted on 2013-12-26
11
259 Views
Last Modified: 2013-12-27
Folks,
I have a need to print out the Form names ("frmSolutionProduction","frmSolutionSales",...) that I have created to another worksheet in my workbook. I am consolidating many forms and as I eliminate reducndancy I want to make sure I mark off what I've done from a list.
There are hundreds of forms to track.
0
Comment
Question by:Frank Freese
[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
  • 6
  • 5
11 Comments
 
LVL 48

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 39740203
Dim frm As Object
For Each frm In Application.VBE.ActiveVBProject.VBComponents
    If frm.Type = 3 Then '3 = vbext_ct_MSForm
        Debug.Print frm.Name
    End If
Next

Open in new window

0
 

Author Closing Comment

by:Frank Freese
ID: 39740251
thanks...that go what I need
having an issue with using one form (yesterdays work), but I haven't finised researching what I have not done (which is probably the case). If I need help I'll let you know...
0
 

Author Comment

by:Frank Freese
ID: 39741887
Martin,
My good man you "nailed" it!!!! One down and 316 to go.
Thank you so very much.
I started to get into Excel programming with this project and I have leanred so much. I'm an Access developer first (with little demand here in Memphis) but now I am building great Excel skills.
If we do not connect before 1/2, enjoy your trip, leave the laptop at home and always remember #3.
Frank
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 48

Expert Comment

by:Martin Liss
ID: 39742205
You're welcome and I'm taking your advice.
0
 

Author Comment

by:Frank Freese
ID: 39742332
Great...
I found a problem in our thread on a single form.
Some of my tabs did not have solutions yet. So I manually entered them in the SolutionsDisplay - no problem, until I got to a formula. I solved that by simply placing an ' before the formula to indicate that it is text.
This change is fantastic. What I have found interesting is that I expected the size of the workbook to get smaller since I will have a lot less forms. Instead it is growing, even after a compile. As I go through each sheet I'll evaluate to see if there are any ranges no longer needed.
0
 
LVL 48

Expert Comment

by:Martin Liss
ID: 39742355
...I solved that by simply placing an ' before the formula to indicate that it is text.
That works of course but one of the steps I suggested in another thread of ours was to select all the cells on the sheet and format them as Text (the default is General). If you do that you won't need to worry about formulas.
0
 

Author Comment

by:Frank Freese
ID: 39742396
That's interesting because I started our formatting the complete sheet as text. Since some of my forms were already created in a text box one has to conclude that it is text when copied into Excel. That might explain why the problem did not appear until I manuualy typed in a formula. The ' did solve the problem though.
0
 
LVL 48

Expert Comment

by:Martin Liss
ID: 39742477
BTW did you see my last post in this thread? Even if you looked at it before, look again because I edited it with a better solution.
0
 

Author Comment

by:Frank Freese
ID: 39742557
If this is what you're mean(?), yes, and I've already incorporated it.
Private Sub UserForm_Activate()
'new
cmdPrintAlterSol.SetFocus
End Sub

Open in new window


If not, then I must have missed something.
Something better - maybe I'll start calling you "Santa"!
0
 
LVL 48

Expert Comment

by:Martin Liss
ID: 39742568
I'm referring to the ShowSolution code in post ID: 39741122 in that thread. That code uses AutoSize rather than a formula to calculate the proper height for txtSolution. Have you incorporated that new version of the sub? If you have then it's up to you of course but barring any current problems I think you should close that thread.
0
 

Author Comment

by:Frank Freese
ID: 39742592
Yes, I've incorporated that...OK...If I have any additional issues with that I'll open a new question. Thanks.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

623 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