Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default VBA Code to switch view

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default VBA Code to switch view

displays the formula instead of the evaluated values?

One way...

With ActiveWindow
.DisplayFormulas = Not .DisplayFormulas
End With

HTH
Dana DeLouis


"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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
View the code in a add-in sh0t2bts Excel Worksheet Functions 9 April 3rd 23 07:33 PM
View Code question Doug Waters 03/03/08 Excel Discussion (Misc queries) 6 July 17th 08 07:51 PM
how view a WS code/properties Steven Excel Programming 5 April 19th 04 05:44 PM
Mouse in Code View Sean McPoland[_2_] Excel Programming 1 February 5th 04 04:49 PM
Number Switch Code Joe B.[_3_] Excel Programming 3 January 10th 04 10:09 PM


All times are GMT +1. The time now is 11:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"