Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-31-2018, 01:51 AM
mark99k's Avatar
mark99k mark99k is offline Userform dimensions suddenly exaggerated Windows 7 32bit Userform dimensions suddenly exaggerated Office 2010 32bit
Novice
Userform dimensions suddenly exaggerated
 
Join Date: Oct 2012
Location: California USA
Posts: 20
mark99k is on a distinguished road
Default Userform dimensions suddenly exaggerated

This is the weirdest behavior I've ever seen in >15 years of VBA. All of the userforms in my largest Word add-in suddenly now display at vastly more than their intended width and with a varying amount of extra height.

All controls are proportionally elongated horizontally, but not vertically. (So there's a chunk of extra dead space at the bottom of the form, but none on the side.)



The extreme width ranges from double to quintuple the design width, and is visible both in the VBE and when the form is run. But the added height (which is not nearly as extreme, typically an inch or so) is seen only when the form is run.

Adjusting a form's width explicitly in the Activate event (Me.Width = xxx) restores normal proportions to all controls no matter what width is specified. That is, I can get normal appearance by adding Width and Height specs and then fudging the intended dimensions by trial & error. Clearly that's not a fix. (This add-in has over 30 userforms.)

The screenshots attached illustrate. Sorry for the resizing, but the original dimensions of the uncorrected one would make the post's window a scrolling nightmare. Notice the shape of the buttons on right in the ridiculous image vs. the nonridiculous images. The actual displayed width of the former is more than 4x that of the latter.

This happens on various PCs with different video card and monitor setups, so obviously it's not a hardware thing. Where do I even start?

Grateful for any clues.
Mark
Attached Images
File Type: jpg ss1.jpg (17.5 KB, 26 views)
File Type: jpg ss2.jpg (44.0 KB, 26 views)
Reply With Quote
  #2  
Old 10-31-2018, 07:58 PM
macropod's Avatar
macropod macropod is offline Userform dimensions suddenly exaggerated Windows 7 64bit Userform dimensions suddenly exaggerated Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Without actually seeing the problem userform, it can be difficult for anyone to diagnose the issue. Can you attach a document to a post with the userform and some representative data (delete/obfuscate anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 11-01-2018, 07:23 PM
mark99k's Avatar
mark99k mark99k is offline Userform dimensions suddenly exaggerated Windows 7 32bit Userform dimensions suddenly exaggerated Office 2010 32bit
Novice
Userform dimensions suddenly exaggerated
 
Join Date: Oct 2012
Location: California USA
Posts: 20
mark99k is on a distinguished road
Default

Thanks in advance, Paul. I'm uploading a .dotm file with one of the userforms, as well as a screenshot of what it's supposed to look like when its proportions aren't out of whack.

This happens to be one of the (physically) largest UFs, but the problem shows up in all of the forms in the add-in, and they vary widely in size/shape. I also just today noticed the same symptoms in the UFs in one of my Excel add-ins.

The affected Word add-in is one that gets used, and edited, a lot; but the affected Excel add-in is used only rarely and hasn't been changed in several months.

I really appreciate you taking a look.
Mark
Attached Images
File Type: jpg userform screenshot with correct proportions.jpg (113.3 KB, 21 views)
Attached Files
File Type: dotm sample add-in to illustrate userform issue.dotm (91.8 KB, 13 views)
Reply With Quote
  #4  
Old 11-01-2018, 08:49 PM
macropod's Avatar
macropod macropod is offline Userform dimensions suddenly exaggerated Windows 7 64bit Userform dimensions suddenly exaggerated Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I suggest you check the userforms' specified heights & widths; the one you uploaded is set to 631.5 points (~8.77in) high & 2334 points (~32.42in) wide. Unless there's some obscure form of file corruption at work, the most likely explanation is that someone has edited the userform dimensions.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 11-01-2018, 10:11 PM
mark99k's Avatar
mark99k mark99k is offline Userform dimensions suddenly exaggerated Windows 7 32bit Userform dimensions suddenly exaggerated Office 2010 32bit
Novice
Userform dimensions suddenly exaggerated
 
Join Date: Oct 2012
Location: California USA
Posts: 20
mark99k is on a distinguished road
Default

Yes, that I knew. Sorry, I guess I wasn't clear at first. All the forms have had their properties altered, but nobody has access to my PC and that's the only place they're ever edited. Also, nobody in my organization understands even the most basic concepts about VBA. If this is malware, it seems like a seriously pointless payload.

And beyond the fact of the forms being resized is the question of how their controls, which were also resized, can be restored to their original dimensions & proportions just by changing the form's width in the Properties window (by any amount). That doesn't jive with my long experience creating and modifying userforms.

I've kind of surrendered right now & written macros to correct all forms' dimensions if this happens again. But I was hoping for some clue to why it happened at all.
Reply With Quote
  #6  
Old 11-01-2018, 10:56 PM
Guessed's Avatar
Guessed Guessed is offline Userform dimensions suddenly exaggerated Windows 10 Userform dimensions suddenly exaggerated Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I haven't ever seen a userform change size by itself so I don't think it is a common problem.

Has the document been opened and saved from a Mac? The sizing differences between PC and Mac versions of Word 'might' be a factor.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #7  
Old 11-01-2018, 11:09 PM
mark99k's Avatar
mark99k mark99k is offline Userform dimensions suddenly exaggerated Windows 7 32bit Userform dimensions suddenly exaggerated Office 2010 32bit
Novice
Userform dimensions suddenly exaggerated
 
Join Date: Oct 2012
Location: California USA
Posts: 20
mark99k is on a distinguished road
Default

Hi Andrew. No, it's never been touched by a Mac.

I've never seen it happen before either. And even if I could've done it accidentally (with what would've had to be an insanely long inadvertent mouse-drag, I guess), it's impossible to think I could've done it to all 30+ userforms in the file....
Reply With Quote
Reply

Tags
userform



Similar Threads
Thread Thread Starter Forum Replies Last Post
True 4:3 background dimensions a_gunslinger PowerPoint 1 11-28-2016 08:22 PM
Userform dimensions suddenly exaggerated Drawing room layouts with dimensions Jeff Fenerty Drawing and Graphics 4 01-01-2016 07:13 PM
VBA Code in a UserForm module to delete a Command Button which opens the userform Simoninparis Word VBA 2 09-21-2014 03:50 AM
Command button to show userform suddenly stopped working jpb103 Word VBA 0 05-22-2014 06:05 AM
Userform dimensions suddenly exaggerated Page dimensions are changing in word 2003 OldFashionedOutlookUser Word 4 05-15-2012 02:44 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:35 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft