Simple way to re-write VBA code?

spydey

Active Member
Joined
Sep 19, 2017
Messages
314
Office Version
  1. 2013
Platform
  1. Windows
So I have some code that I have written referencing arrays, named ranges, and ranges.

I have taken the workbook and re-designed it to be table based.

I figure I will have to re-write the VBA code to reference the table objects instead of the ranges, right?

Is there a simple way to do this or am I going to have to go line by line and re-write it to properly reference the table objects in place of the ranges/named ranges/arrays?

Thanks for your help!

-Spydey
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
You can still reference simple ranges in an Excel Table. Named ranges work also. When you say you're referencing arrays, do you mean arrays in VBA?

Jeff
 
Upvote 0
You can still reference simple ranges in an Excel Table. Named ranges work also. When you say you're referencing arrays, do you mean arrays in VBA?

Jeff

Yes, I figured I could still reference the same ranges and named ranges, but when I redesigned the workbook to be table based, I renamed my ranges, etc.

As far as the arrays, yes they are coded in VBA.

I think I am going to have to re-write the majority of it.

Good practice for me .... just didn't want to have to re-do what took me ages ... hahaha, but I am just learning so maybe this will be a good thing.

Thanks for your input.

-Spydey
 
Upvote 0
hahaha, but I am just learning so maybe this will be a good thing.
Is is a good thing -- the code will be better, more organized, easier to understand.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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