vba guidance, please - some coding issues

lordriel

Board Regular
Joined
Nov 1, 2005
Messages
68
Office Version
  1. 365
Platform
  1. Windows
I'm afraid my question may be too general to garner a response, but here goes...

I'm building a (truck) yard maintenance spreadsheet. Currently it's broken into 3 parts:

Sheet 1 is the location listing - for all intents and purposes, a spreadsheet listing 1 through 120, with a field for trailer number and a field for contents. The third column has a text button that toggles to the proper location on the second sheet.

Sheet 2 is a series of 122 locations, each one 7 columns x 27 rows - for simplicity's sake, I've set them up in a series of 3 across and 41 down. On each of the location details, I include the following text buttons - Yard List, Clear, Print, and Move. Yard List toggles back to the first sheet, precisely to the location the detail is for. Clear clears all info on the detail. Move enables the user to move the data in one detail to another detail and updates the location on Sheet 1 accordingly. And Print will print the current location.

Sheet 3 is the default form that the data from each location is plugged into in order to print it.

There is a fourth sheet. I use this as part of the Move function. I copy the contents of the location to the fourth sheet (this is relatively unseen by the user), clear the original location, and copy from the fourth sheet to the new location.

However, I have the following issue. As of now, once I get the first three locations to copy back and fourth correctly (this is a work in progress, but I think I can lick it), I will have to manually update the other 119 locations accordingly.

99% of what I know about VBA is self-inhaled, backed up with some experience in VAXBasic. I'm guessing my issue could be resolved with arrays - but arrays are something I've just not been able to grasp, despite all I've read and attempted to emulate.

Long story summed - anyone got any pointers to help me? Any help would be greatly appreciated.

I'd include the code, but it's fairly large and any one portion would probably not provide much insight, since I think my issue is more in approach than in coding.

Thanks in advance for reading, and for replying...
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Re: vba guidance, please - some coding issues - updated

Just an update on this issue.

I resolved half of the issue by eliminating the sheet with the location detail, and am displaying all info on one location form based on location selected.

The other half is still a difficulty since any change tothe coding for one location has to be populated in the subs for all the other locations. Time-consuming, but do-able.

If I can ever get my head to wrap around arrays, I will solve that issue.

Thanks for reading, and assisting where applicable.

lr
 
Upvote 0

Forum statistics

Threads
1,215,499
Messages
6,125,163
Members
449,210
Latest member
grifaz

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top