Public variable for captura path in vba excel

0 votes

I need to record the path of the excel file in a public VBA excel variable. I have a macro that utilises the path several times across various modules. My issue arises when the variable is declared in the Option Explicit Contex.

`Option Explicit Public ruta As String

ruta = ActiveWorkbook.Path

Public Const varRuta = ruta & "\ValidacionesSunat"

Sub EdufarmaEstadoRevisado()

the variables you must use in the code TextFile Should Be A Number I, J, K, L, and M, As Integer String: MyFile Dim Dark Zone Low values The same dim batch Set batchDe10 to Set batchSaldoUnits to 

On Error Resume Next Kill varRuta & "." On Error GoTo 0 `

Jan 22, 2023 in Others by Kithuzzz
• 38,000 points

edited 5 days ago 13 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP