ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Calling Sub(s) from ThisWorkbook (https://www.excelbanter.com/excel-programming/285085-calling-sub-s-thisworkbook.html)

BSchwerdt

Calling Sub(s) from ThisWorkbook
 
Hi,

I am currently using Excel 2000 setting up a VBA process to load data
from a CSV file into a new worksheet. Everything was working great
until I tried to move some of my sub(routines) from ThisWorkbook to a
Module1.

I can't tell if the sub's in Module1 are running and if they are, they
are not updating my variables. I have everything declared as Public
including both my Subs and my variables so I don't think I have to pass
anything back and forth. What am I missing?

Any help would be great!!
B

:confused:


---
Message posted from http://www.ExcelForum.com/


Colo[_10_]

Calling Sub(s) from ThisWorkbook
 
Hi BSchwerdt,

I think you have to know where is the point at issue.
First I reccomend to add "Option Explicit" at the beginning of your
code.
And run your code with [F8] key (step by step)
See the value of the variables at the Local window in VBE.

PLEASE NOTE: Public variables should be placed in a standard module,
NOT thisWorkbook module.


---
Message posted from http://www.ExcelForum.com/



All times are GMT +1. The time now is 03:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com