Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-24-2016, 07:15 PM
Guessed's Avatar
Guessed Guessed is offline AutoOpen to Update TextBox Value Windows 10 AutoOpen to Update TextBox Value Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
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


The randomiser works for me but I changed it slightly to test.
Code:
    lngIndex = Int((16) * Rnd)
     MsgBox lngIndex & vbCr & strQuotes(lngIndex)
It wouldn't work if you had your code in a template because it needs a saved document path which you don't have when opening a new document. It also presupposes that that your document contains the tbRandomQuote object.

Could your issue be due to the timing of the AutoOpen macro actually running prior to the opening document becoming the 'ActiveDocument'?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto-update field codes in Outlook Template - AutoOpen Macro not working victoriasun Outlook 5 12-22-2015 01:54 AM
Update a summary chart when I update a dashboard with dates cangelis Excel 6 09-24-2014 08:08 AM
AutoOpen to Update TextBox Value Display result in textbox based on the input of another textbox scarymovie Word VBA 5 05-16-2012 07:05 PM
Textbox Template t0m46 Word 0 09-07-2010 03:38 AM
AutoOpen to Update TextBox Value Making a Macro "autoopen" Joshocom Word 1 03-16-2010 05:03 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:34 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