Hello,
I have been working on this inventory project for the past month and it's working great, but I've tried creating a dashboard to get an overview of the whole system and to be able to control it from the dashboard. I've created a bunch of different modules (I have over 10) that each control a different aspect of the the workbook (i.e., broken down by worksheet and import/export). I'm not trying to create the Update macro for the dashboard. This macro will run a number of other subs from different modules in order to purge old items and update new items.
The bug that I'm getting now is when I run "PullSalesData.VBA_Read_External_Workbook" - this sub extracts data from another workbook and pulls it into the Sales Worksheet of the Inventory system. However, when it runs in the Dash Macro, it crashes. The problem comes down to this line =
oneRange.Sort Key1:=aCell, Order1:=xlAscending, Header:=xlYes
This code is supposed to sort the data in the Sales Worksheet of the inventory system, but instead it wants to sort it in the dashboard, even though it's running on the Sales Module. Here's the dasboard macro:
Option Explicit
Sub DashPOPData()
' Sales Data
' Purge Completed Sales
' Need to complete
' Run PullSalesData First
PullSalesData.VBA_Read_External_Workbook ' This isn't working right now. Keeps crashing
' Populate Sales Data in Dashboard
DashSalesPull.DashSalePull
' Purchasing
' Push old purchasing data from dashboard
' not completed
' Pull purchasing data
DashPurchPull.purchPull
' Receiving
' Purge Receiving First
' need to complete
' Pull Receving
DashReceivingPull.DashRecPull
' Work in Process
' Purge finished WIP from dashboard
' MANUAL - I have to go to WIP WS and state which items need to be completed that day first
' Pull WIP to Dashboard
DashWIPPull.DashWIPPull
' Application.Wait(Now + #0:00:01#)
' This may be necessary to prevent Excel from crashing
End Sub
Bookmarks