PDA

View Full Version : VBA Help please (Novice)



bluejen512
04-04-2014, 01:54 AM
Hi Everyone - thanks for taking your time to help.
I have the exact same issue as this guy :

" have an Excel file used as a form that has a number of form controls in it (text boxes, combo boxes, etc.). This form worked fine until we upgraded to Office 365.

Now when users click in certain text boxes, the cursor to enter text becomes so small that the user doesn't think they are in the text box. However, if you type some text and then exit the text box, the text returns to normal size. This makes it impossible to actually edit text.

If I go into the properties of each text box and cycle the WordWrap property to "False" and the back to "True" the problem resolves itself until I exit the workbook and then open it again. Which text boxes are affected is completely random. There is no consistency that I can see as to which boxes will be a problem when I open the workbook "

The work around that Darren suggested of adding the following to the textbox gotfocus event :
textbox1.wordwrap = false
textbox1.wordwrap = true

This works for me but the problem i have is that i have around 4000 work sheets :(
Is there a way i modify this code to open every worksheet the same or do i really have to modify all 4000 worksheets?

Thanks for your help
Jenny

Bob Phillips
04-04-2014, 04:06 AM
Post the workbook Jenny, give us something to work with.

bluejen512
04-04-2014, 04:22 AM
Thanks
Please see attached - its the grey box on sheet 1 thats the problem.
Its works fine with excel 2010 but not on the new office 365 excel.
Thanks for your help11508

Bob Phillips
04-04-2014, 05:07 AM
I didn't see the mention of Office 365. Unfortunately, I have Office 365 but I haven't installed it yet, so I can't help.

SamT
04-04-2014, 07:09 AM
There doesn't seem to be a good solution to this bug. My impression is that it is primarily a problem with the Cloud version (Office 365) but that it may be related to another Bug (http://social.msdn.microsoft.com/Forums/office/en-US/a40a2b33-1c3b-4368-885a-629b0bb03faa/form-controls-changes-font-and-size-on-their-behalf?forum=exceldev) that MS is aware of. (http://social.msdn.microsoft.com/Forums/office/en-US/5fd7cbca-671b-42fb-afa2-1cce580bca75/excel-vba-textbox-font-size?forum=exceldev)

http://www.vbforums.com/showthread.php?739163-RESOLVED-Display-font-font-size-of-TextBox-different-from-property-settings

https://answers.microsoft.com/en-us/office/forum/office_2007-excel/textbox-bug-all-excel-versions-setting-new-default/8bfabf2d-eceb-4f8e-959d-b03e54d0e10a

Interesting sub by Andy Pope (http://www.excel-answers.com/microsoft/Excel-Charting/31703254/vba-returning-null-for-textboxfontsize.aspx)

http://stackoverflow.com/questions/19694701/excel-vba-textbox-font-size

https://answers.microsoft.com/en-us/office/forum/office_365hp-customize/excel-2013-activex-controls-text-box-rendering/7b606606-1ffe-42df-96a5-0d780d67c76b

That is all I could find relating to the issue.

You might just have to manually modify all 4000 workbooks, unless you are willing to go back to the previous version of Office.

Bob Phillips
04-04-2014, 07:16 AM
My impression is that it is primarily a problem with the Cloud version (Office 365)

Office 365 is not a cloud version of Office, it is a subscription service to Office. The application is still on your desktop.

SamT
04-04-2014, 09:00 AM
Office 365 is not a cloud version of Office, it is a subscription service to Office. The application is still on your desktop.

http://www.office365answers.com/AllArticles/ID/2341/What-is-Office-365.aspx

Office 365 is a set of cloud services available on a subscription basis from Microsoft.

http://office.microsoft.com/en-us/business/what-is-office-365-for-business-FX102997580.aspx

Because Office 365 is powered by the cloud,

http://office.microsoft.com/en-us/business/office-365-online-business-software-programs-FX102997619.aspx


Office 365 gives you the familiarity and power of Office with the flexibility of the cloud. With Office in the cloud, your applications and files are with you wherever you go

Office in the cloud is more powerful than ever yet simple to use and manage. And it’s always up and running, so you stay on schedule.

Many Office 365 plans include the latest desktop version of Office, so you can work offline or online. [Emph added]

Some Office 365 plans work with earlier desktop versions* of Office

bluejen512
04-07-2014, 01:53 AM
Hi Guys, thanks for all your help, i guess i will have to get going on modifying all the worksheets :(

Thanks
Regards
Jenny