Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 03-17-2016, 11:15 PM
Philb1 Philb1 is offline passing variable from one sub to another Windows 10 passing variable from one sub to another Office 2010 32bit
Advanced Beginner
 
Join Date: Feb 2016
Location: Auckland
Posts: 43
Philb1 is on a distinguished road
Default

Hi Greg

You were getting errors in the userform initialise module because you were trying to sum the whole of columns L and N. L1 and N1 contain text which caused it to throw errors. I've changed the ranges to go from row 3 to the last used row of those columns.
The userform shows when the button is pressed, but doesn't do anything.

With the worksheet change code it appears you want to check the dropdowns in column C for the word Mileage. I changed the code to do that & for demo purposes, put the formula in column O. It's probably not the final product but should hopefully set you in the right direction. I didn't know what all the original code was for, but it did look a bit over complicated for such a simple task. Or have I got it wrong lol

Cheers
Phil
Attached Files
File Type: xlsm Mileage(1) .xlsm (34.1 KB, 11 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
passing variable from one sub to another userform help (having trouble passing info from form to macro) cyraxote Word VBA 16 09-08-2015 04:16 AM
Run Time Error '91': Object variable or With block variable not set using Catalogue Mailmerge Berryblue Mail Merge 1 11-13-2014 05:36 PM
passing variable from one sub to another Run-time error 91 object variable or with block variable not set JUST ME Word VBA 4 03-25-2014 06:56 AM
passing variable from one sub to another object variable or with block variable not set MJP143 Excel 1 02-11-2013 05:07 AM
passing variable from one sub to another Run-time error '91': Object variable or With block variable not set tinfanide Excel Programming 2 06-10-2012 10:17 AM

Other Forums: Access Forums

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