Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 333
Default Wrap not working

Hi,

I am placing information to a worksheet via vba code and the wrap is not
working. How do I correct this? Here is my code:

Sub SaveTenantName(Choice)

With MainPagepg

'save Tenants Name
With .Cells(Choice, 6)
.NumberFormat = "General"
.HorizontalAlignment = xlLeft
.WrapText = True
.Value = frmStoreData.txtTenantName.Value
End With

End With

End Sub
--
Thanks for your help.
Karen53
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 333
Default Wrap not working

I realize now the wrap is there but the row height is not adjusting to show
the text.
--
Thanks for your help.
Karen53


"Karen53" wrote:

Hi,

I am placing information to a worksheet via vba code and the wrap is not
working. How do I correct this? Here is my code:

Sub SaveTenantName(Choice)

With MainPagepg

'save Tenants Name
With .Cells(Choice, 6)
.NumberFormat = "General"
.HorizontalAlignment = xlLeft
.WrapText = True
.Value = frmStoreData.txtTenantName.Value
End With

End With

End Sub
--
Thanks for your help.
Karen53

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 333
Default Wrap not working

Hi,

I've added row autofit but it still is not sizing. What am I doing wrong?

Sub SaveTenantName(Choice)

With MainPagepg

'save Tenants Name
With .Cells(Choice, 6)
.NumberFormat = "General"
.HorizontalAlignment = xlLeft
.WrapText = True
.Value = frmStoreData.txtTenantName.Value
End With
.Rows(Choice & ":" & Choice).EntireRow.AutoFit
End With

End Sub
--
Thanks for your help.
Karen53


"Karen53" wrote:

Hi,

I am placing information to a worksheet via vba code and the wrap is not
working. How do I correct this? Here is my code:

Sub SaveTenantName(Choice)

With MainPagepg

'save Tenants Name
With .Cells(Choice, 6)
.NumberFormat = "General"
.HorizontalAlignment = xlLeft
.WrapText = True
.Value = frmStoreData.txtTenantName.Value
End With

End With

End Sub
--
Thanks for your help.
Karen53

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Wrap not working

Try this change
from:
With MainPagepg
to:
With sheets(MainPagepg)

or

With sheets("MainPagepg")

"Karen53" wrote:

Hi,

I've added row autofit but it still is not sizing. What am I doing wrong?

Sub SaveTenantName(Choice)

With MainPagepg

'save Tenants Name
With .Cells(Choice, 6)
.NumberFormat = "General"
.HorizontalAlignment = xlLeft
.WrapText = True
.Value = frmStoreData.txtTenantName.Value
End With
.Rows(Choice & ":" & Choice).EntireRow.AutoFit
End With

End Sub
--
Thanks for your help.
Karen53


"Karen53" wrote:

Hi,

I am placing information to a worksheet via vba code and the wrap is not
working. How do I correct this? Here is my code:

Sub SaveTenantName(Choice)

With MainPagepg

'save Tenants Name
With .Cells(Choice, 6)
.NumberFormat = "General"
.HorizontalAlignment = xlLeft
.WrapText = True
.Value = frmStoreData.txtTenantName.Value
End With

End With

End Sub
--
Thanks for your help.
Karen53

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 333
Default Wrap not working

Hi,

Thank you for your suggestions. I'm using the sheets code name, though.
They did not work.
--
Thanks for your help.
Karen53


"Joel" wrote:

Try this change
from:
With MainPagepg
to:
With sheets(MainPagepg)

or

With sheets("MainPagepg")

"Karen53" wrote:

Hi,

I've added row autofit but it still is not sizing. What am I doing wrong?

Sub SaveTenantName(Choice)

With MainPagepg

'save Tenants Name
With .Cells(Choice, 6)
.NumberFormat = "General"
.HorizontalAlignment = xlLeft
.WrapText = True
.Value = frmStoreData.txtTenantName.Value
End With
.Rows(Choice & ":" & Choice).EntireRow.AutoFit
End With

End Sub
--
Thanks for your help.
Karen53


"Karen53" wrote:

Hi,

I am placing information to a worksheet via vba code and the wrap is not
working. How do I correct this? Here is my code:

Sub SaveTenantName(Choice)

With MainPagepg

'save Tenants Name
With .Cells(Choice, 6)
.NumberFormat = "General"
.HorizontalAlignment = xlLeft
.WrapText = True
.Value = frmStoreData.txtTenantName.Value
End With

End With

End Sub
--
Thanks for your help.
Karen53

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
Wrap Text not working in places Nick Wakeham Excel Discussion (Misc queries) 2 January 15th 09 06:06 PM
Word Wrap Not Working Nick Wakeham Excel Worksheet Functions 0 January 15th 09 03:58 PM
Text wrap not working properly in Excel Nige1962 Excel Discussion (Misc queries) 1 August 19th 06 12:50 PM
Word Wrap not working correctly L. S. Martin Excel Worksheet Functions 0 January 23rd 06 03:23 PM
word wrap not working bbxrider Excel Discussion (Misc queries) 2 December 8th 04 06:55 AM


All times are GMT +1. The time now is 06:25 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"