Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8137741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:15:27+00:00 2026-06-06T11:15:27+00:00

I am not a VBA programmer. However, I have the ‘unpleasant’ task of re-implementing

  • 0

I am not a VBA programmer. However, I have the ‘unpleasant’ task of re-implementing someones VBA code in another language. The VBA code consists of 75 modules which use one massive ‘calculation sheet’ to store all ‘global variables’. So instead of using descriptive variable names, it often uses:

= Worksheets("bla").Cells(100, 75).Value

or

Worksheets("bla").Cells(100, 75).Value =

To make things worse, the ‘calculation sheet’ also contains some formulas.

Are there any (free) tools which allow you to reverse engineer such code (e.g. create Nassi–Shneiderman diagram, flowcharts)? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T11:15:29+00:00Added an answer on June 6, 2026 at 11:15 am

    I think @JulianKnight ‘s suggestion should work
    Building on this, you could:

    1. Copy all the code to a text editor capable of RegEx search/replace (Eg. Notepad++).
    2. Then use the RegEx search/Replace with a search query like:
      Worksheets\(\"Bla\"\).Cells\((\d*), (\d*)\).Value
    3. And replace with:
      Var_\1_\2

      This will convert all the sheet stored values to variable names with row column indices.
      Example:

      Worksheets("bla").Cells(100, 75).Value    To    Var_100_75
      
    4. These variables still need to be initialized.
      This may be done by writing a VBA code which simply reads every (relevant) cell in the “Bla” worksheet and writes it out to a text file as a variable initialization code.
      Example:

      Dim FSO As FileSystemObject 
      Dim FSOFile As TextStream 
      Dim FilePath As String 
      Dim col, row As Integer 
      
      FilePath = "c:\WriteTest.txt" ' create a test.txt file or change this
      
      Set FSO = New FileSystemObject 
       ' opens  file in write mode
      Set FSOFile = FSO.OpenTextFile(FilePath, 2, True) 
       'loop round adding lines
      For col = 1 To Whatever_is_the_column_limit
          For row = 1 To Whatever_is_the_row_limit
           ' Construct the output line
              FSOFile.WriteLine ("Var_" & Str(row) & "_" & Str(col) & _
                             " = " & Str(Worksheets("Bla").Cells(row, col).Value)) 
          Next row
      Next col
      
      FSOFile.Close 
      

    Obviously you need to correct the output line syntax and variable name structure for whatever other language you need to use.

    P.S. If you are not familiar with RegEx (Regular Expressions), you will find a plethora of articles on the web explaining it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not sure why my code is not working.. I have code in vba
I have no experience in using vba. I am not a programmer. I have
I have an Excel VBA Script I've written with help, I am not a
VBA is not cutting it for me anymore. I have lots of huge Excel
I am a hobbyist programmer (started with VBA to make excel quicker) and have
Why does this VBA code not work?: Sub AllToGeorgia12() Selection.Font.Size = 12 Selection.WholeStory Selection.Font.Name
I have a question about variables and functions in VBA. I'm not going to
I'm not an experienced vba programmer and working with access is not my cup
I'm not an experienced vba programmer and working with access is not my cup
I'm looking for an algorithm for which I do not have the VBA knowledge

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.