View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default VBA Code to switch view

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


---
Regards,
Norman



"Adrian" wrote in message
...
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..


--
Regards,
Adrian