vba - code to hide not carry out action if any cell in range is blank

surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
597
Office Version
  1. 365
Hi all

Firstly thanks for everyones help previously. Greatly appreciated and helps my knowledge no end.

In Range"C16" - if it contains a value i.e. - "XXX" then y screen resizes.

There is code of
Code:
Application.ScreenUpdating = TRUE

After this, I do not want anything updated if cells C17:c20 are empty

Once C22 is populated, I want the code to run again
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Firstly, apologies it will not allow me to edit my first post - and I don't think I explained it well!!

Hi

Sorry I don’t think my previous post made much sense!

In cell C16, there is a dropdown menu with various optionsAAA, BBB, CCC, DDD etc

When this is populated it refreshes the worksheet tohide/show certain columns/rows as necessary.

The user has to input data in cells C17:C20 and C22. At themoment the screen refreshes/flashes everytime a user inputs code as at themoment there is the code
Code:
Application.ScreenUpdating = True


I know I need to have
Code:
Application.ScreenUpdating = False
in thereto stop this.



What I need is my initial code to run (to resize the screenon user input on cell C16, and then to have the screen update set to falseuntil the user has filled in all cells from C17:c22 (cell c21 will alwayscontain data)

Hopefully that makes more sense!!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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