Text Box visibility problem

Pricy

New Member
Joined
Mar 22, 2009
Messages
7
Using code ActiveSheet.Shapes("TextBox 23").Visible = True/False
Shows Text Box only in some areas of code.
Using Application.ScreenUpdating = True/False as required
Seems problem occurs only where an input or selection window is coded in the module
Seems irrational action for excel.
Using Pro 2016 excel with Windows 10
Anyone to help please
Pricy
 
I will try this again
- formatting got screwed
 
Last edited:
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
2nd try - website took exception to some of the colours I added to the code!

I would initially focus on speeding up the code ...
- avoid selecting objects (selecting takes time and VBA (generaly) does not require ranges to be selected)
- use varables to avoid recalculating the same values multiple times (every calculation takes extra time)
- avoid pasting values (assigning values is much faster)

I have re-written some of your code to illustrate:
- none of the ranges have been selected
- variable x used to avoid multiple recalcualtions of GRecordNo + 11 etc
- variable rng used to get dimensions of each range(row & column count) - required for "assign to" range

Code:
Dim rng As Range, x As Long
    With Range("BO8:BY508")
        .ClearContents ' clear copy to area
        .NumberFormat = "General"
    End With
    
    GRecordNo = Application.CountA(Range("B8:B508"))
    x = GRecordNo + 11
    Range("BR8:BW" & x).NumberFormat = "$#,##0.00"
    Range("BY8:BY" & x).NumberFormat = "$#,##0.00"
   
    x = GRecordNo + 7
    Set rng = Range("A8:B" & x)
        Range("BO8:BP" & x).Resize(rng.Rows.Count, rng.Columns.Count).Value = rng.Value
    
    Set rng = Range("F8:F" & x)
        Range("BQ8").Resize(rng.Rows.Count, rng.Columns.Count).Value = rng.Value
    
    Set rng = Range("G8:N" & x)
        Range("BR8:BY" & GRecordNo + 7).Resize(rng.Rows.Count, rng.Columns.Count).Value = rng.Value
    x = GRecordNo + 9
    Range("BP" & x) = "TOTAL RECEIPTS"
    
    Set rng = Range("G5:N5")
    Range("BR" & x).Resize(rng.Rows.Count, rng.Columns.Count).Value = rng.Value
    x = GRecordNo + 10
    Range("BP" & x) = "Unit Numbers - Unit Refunds"
    
    Set rng = Range("H3:L3")
    Range("BS" & x).Resize(rng.Rows.Count, rng.Columns.Count).Value = rng.Value
    x = GRecordNo + 11
    Range("BP" & x) = "Refunds Payments -"
    Set rng = Range("Q5:V5")
    Range("BR" & x).Resize(rng.Rows.Count, rng.Columns.Count).Value = rng.Value
    
    Range("BY" & x).Resize(rng.Rows.Count, rng.Columns.Count).Value = Range("W5").Value
 
Upvote 0
Sorry my browser Google Chrome is having trouble with the web site.
Thank you for your alternate pasting coding - will endeavour to adapt non selective coding in future.
But the pasting occurs in less than a blink of an eye, whilst the Print Page set up is the culprit.
Was the need to post a text message for the user for the obvious pause.
Thus is then offered for Hard copy print or PDF file writing.

Thank you, much appreciated

Pricy
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top