Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pam Pam is offline
external usenet poster
 
Posts: 128
Default Visual Basic in Excel, Resize the Cell automatically

How do I automatically resize a cell in Visual Basic depending on the amount
of text I enter?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Visual Basic in Excel, Resize the Cell automatically

Pam,

It depends on what you want to do. Like this

Range("A1").Value = "antidisestablishmentarianism"
With Range("A1")
.WrapText = True
End With

or like this

Range("A1").Value = "antidisestablishmentarianism"
Columns("A:A").EntireColumn.AutoFit

Mike

"Pam" wrote:

How do I automatically resize a cell in Visual Basic depending on the amount
of text I enter?

  #3   Report Post  
Posted to microsoft.public.excel.programming
Pam Pam is offline
external usenet poster
 
Posts: 128
Default Visual Basic in Excel, Resize the Cell automatically

Perfect. The autofit works like a charm. THANK YOU!!

"Mike H" wrote:

Pam,

It depends on what you want to do. Like this

Range("A1").Value = "antidisestablishmentarianism"
With Range("A1")
.WrapText = True
End With

or like this

Range("A1").Value = "antidisestablishmentarianism"
Columns("A:A").EntireColumn.AutoFit

Mike

"Pam" wrote:

How do I automatically resize a cell in Visual Basic depending on the amount
of text I enter?

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
Putting a value in specifc Excel cell from Visual Basic RichardSchollar Excel Programming 0 January 23rd 07 08:52 PM
Can I run Visual Basic procedure using Excel Visual Basic editor? john.jacobs71[_2_] Excel Programming 3 December 26th 05 02:22 PM
Range.Resize from Visual Basic in Windows to Excel MMesarch Excel Programming 2 January 27th 05 03:27 PM
Excel Cell Formating in Visual Basic 6.0 ElanKathir .S.N Excel Programming 2 May 3rd 04 11:54 AM
Visual Basic to reference value in Excel cell Raymond[_4_] Excel Programming 1 October 28th 03 08:24 PM


All times are GMT +1. The time now is 03:41 PM.

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"