Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-24-2014, 06:17 PM
macropod's Avatar
macropod macropod is offline Multiple Userforms Displaying Different Content but Returning Same Content? Windows 7 32bit Multiple Userforms Displaying Different Content but Returning Same Content? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

The code you've posted initializes the userform with contents drawn only from the second table in the document. So, if your command button is doing something different, it seems to me your command button code is where you should look.



A couple of points:
1. Having set oTbl via 'Set oTbl = oDoc.Tables(2)', the first set of loops ignores that and continues to reference oDoc.Tables(2);
2. Whereas the first loop efficiently uses a range object to retrieve the cell content, the second loop takes an entirely different, and less efficient, approach, retrieving then truncating the cell content. You could quite easily have re-used the previous range object (and even the row/column indices rather than using a completely new set).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
multiple userforms



Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Userforms Displaying Different Content but Returning Same Content? Allow Multiple Content Control same cell of form table DeborahBartlett Word 1 01-04-2014 11:06 AM
Multiple Userforms Displaying Different Content but Returning Same Content? Deleting a table from a content control -- preserving the content control BrainSlugs83 Word Tables 8 11-14-2013 03:06 AM
Multiple Userforms Displaying Different Content but Returning Same Content? Content Controls Sammie0Sue Word 6 11-06-2013 10:56 PM
Multiple Userforms Displaying Different Content but Returning Same Content? macro for change content of cell2 when content of cell1 changes Intruder Excel Programming 1 11-17-2012 08:24 PM
Package for CD with links to Windows media player content and Flash Shockwave content hectorh PowerPoint 4 10-15-2009 12:22 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:02 PM.


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