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

  • Home
  • SEARCH
  • 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 5967009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:52:52+00:00 2026-05-22T19:52:52+00:00

Is it possible to divide a function into sections, something like this? Function myFunc

  • 0

Is it possible to divide a function into sections, something like this?

Function myFunc

  Section
    Dim i As Integer = 0
    ...
  End Section

  Section
    Dim i As Integer = 0
    ...
  End Section

End Function

I realize it could be done with

If True Then
  Dim i As Integer = 0
  ...
End If

but that seems like a hack

Am I going about this the wrong way?

  • 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-05-22T19:52:54+00:00Added an answer on May 22, 2026 at 7:52 pm

    I would recommend refactoring your “Sections” into separate functions or subs, and calling them as appropriate. The fact that you want this separate seems like it highlights an opportunity for refactoring….

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

Sidebar

Related Questions

Possible Duplicate: What's wrong with this division? If you divide 2 / 3 ,
Possible Duplicate: How do I calculate someone's age in C#? Maybe this could be
set phoneNumber 1234567890 this number single digit, i want divide this number into 123
Is it possible to divide an unsigned integer by 10 by using pure bit
Possible Duplicate: Divide problem Why does c# show the output of this code as
Possible Duplicate: JavaScript: var functionName = function() {} vs function functionName() {} What's the
I'm just wondering if this is even possible; how to do non-complicated scripting within
Although I do understand the serious implications of playing with this function (or at
Is it possible to extend File Class? I would like to add new GetFileSize
I'd like to divide tasks for the development of a NSIS installer among a

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.