Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 2nd, 2005, 12:59 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default Setting Column Width

Hi Experts,

I am new to VBA & Excel Programming.

I am designing some reports to be viewd in Excel. I am using VBA for generating the reports. Can someone tell me how to set the column width and other properties.

I would be happy if someone could send me some good links for Excel-VBA reference.

Regards
Ganesh

Regards
Ganesh
__________________
Regards
Ganesh
http://ganeshprof.blogspot.com
Find your solution here...
 
Old February 2nd, 2005, 05:17 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Being new to VBA I would recommend you first port of call to be utilising the record macro functionality, known as the Excel Primer. If you go to [Tools]-[Macro]-[Record New Macro] a dialogue box appears asking where you want to record the macro, usually you would set this to "This Workbook" and click continue/OK.
Conduct the processes you want to achieve such as adjusting the column widths as you described, then click on the stop icon represented by the filled square. This stops recording the macro you have just created.

Then go to [Tools]-[Macro]-[Macros] and in the form that appears select the name of the macro you have just created and click edit. You will then be shown the environment called the Visual Basic Editor or VBE. The code displayed in the VBE is what you just recorded. Make yourself accustomed to the different areas and what they are showing you. Look at the code, if necessary step through one process at a time in the code by first placing the cursor within the text of the macro and by pressing the function key [F8] execute on line at a time, if you split your windows into two half screen with both excel and VBE visable you can see the results of the code as it is executed. I found this is the best way to learn the basics.
I now swear by the wrox "Excel 2000 VBA - programmers reference" book. I don't work for them, but I think it is excellent value for money.

If you are having trouble with specific code once you have recorded it and amended it, then post the code with your problem on forums such as this.

Regards


Matthew

 
Old February 2nd, 2005, 06:06 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

Thanx Mathew for your reply. I will follow what you mentioned

Regards
Ganesh





Similar Threads
Thread Thread Starter Forum Replies Last Post
Table: width setting for a cell Venki XSLT 2 July 14th, 2008 09:05 AM
Setting the Logical Page Width mitchm Crystal Reports 0 May 24th, 2007 06:03 PM
Setting Column width in Datagrid anita General .NET 2 April 13th, 2005 02:25 AM
Column width immanuelsamuel Oracle 2 March 13th, 2004 10:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.