VBA Code to switch view

  • Thread starter Thread starter Adrian
  • Start date Start date
A

Adrian

Hi,

Can someone tell me how do I switch view using VBA so that the cells
displays the formula instead of the evaluated values? Also, how do i set the
width of cell columns ? Thanks..
 
Hi Adrian,
Can someone tell me how do I switch view using VBA so that the cells
displays the formula instead of the evaluated values?

ActiveWindow.DisplayFormulas = True
Also, how do i set the width of cell columns ?

To set the width of column A to 20:

Worksheets("Sheet1").Columns("A:A").ColumnWidth = 20

To autofit columns A to D:

Worksheets("Sheet1").Columns("A:D").AutoFit
 
displays the formula instead of the evaluated values?

One way...

With ActiveWindow
.DisplayFormulas = Not .DisplayFormulas
End With

HTH
Dana DeLouis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top