Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-07-2020, 08:04 PM
MikeatMSOffice MikeatMSOffice is offline Macro works at home but not at work Windows 10 Macro works at home but not at work Office 2019
Novice
Macro works at home but not at work
 
Join Date: Feb 2020
Posts: 3
MikeatMSOffice is on a distinguished road
Default



Quote:
Originally Posted by Guessed View Post
Are you saying the document event is not firing or the code is producing an error?

If it is an error, what line is failing and what error message are you seeing?
What is AltS used for and why is it undefined?

AltS is used to indicate that the Alt + S keys have been pressed to run a macro that sets AltS to true to allow escape from showing the Msgbox declaring that tolerances have been exceeded. Otherwise I cannot scroll somewhere else because the tolerance msgbox scrolls me back to the field that's out of tolerance. AltS is Dim'd and set to false somewhere else.


I run the SelectionScrollIntoMiddleOfView() macro on Entry of the form fields to center the field when it is selected. At home the macro works. But at work it simply scrolls to the top of the document and stays there, no matter which field is chosen. No error messages are shown.


I think I need to start printing out all the variables in a Msgbox to see the differences between work and home.



Or maybe I need to role back the Office updates to see if it starts working again.


Thanks.

Last edited by MikeatMSOffice; 02-08-2020 at 08:59 AM.
Reply With Quote
  #2  
Old 02-09-2020, 06:12 PM
MikeatMSOffice MikeatMSOffice is offline Macro works at home but not at work Windows 10 Macro works at home but not at work Office 2019
Novice
Macro works at home but not at work
 
Join Date: Feb 2020
Posts: 3
MikeatMSOffice is on a distinguished road
Default

Since the document continues to scroll to the top when I click on a field that runs SelectionScrollIntoMiddleOfView() on Entry, it seems the ActiveWindow.SmallScroll Direction inside the Do Loop is being executed. But the scrolling is not stopping when it is supposed to. So I suspect the conditional statements of the Do Loop are not being evaluated correctly. Let me put some parenthesis in the conditional statement to see if it evaluates correctly. I'll let you know.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro works at home but not at work Macro to Find and Replace Does Not Work - But Works Manually Rod_Bowyer Excel Programming 7 10-14-2018 11:49 PM
Macro works at home but not at work Using Onenote on Work and Home computers and on Android phone johnmccrady OneNote 1 12-27-2015 09:59 PM
Macro works at home but not at work Why won't up and down work like home and end anymore? Scythe Word 5 03-04-2015 12:32 PM
Macro works at home but not at work work vs regular work. and how regular work works user0044 Project 5 03-06-2012 07:28 AM
Ctrl+Home no longer works to get me to beginning of doc. migdaw01 Word 0 01-13-2011 12:11 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:19 AM.


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