'//////////////////////////////////// ((((((())))))) \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ' ScienSolar v 1.5 MAIN MODULE 2. Updated 07-2024 ' ScienSolar package for modeling physics and mathematics in MS Excel (tested on MS Excel 2013-2019 for Windows and Mac). ' The package is distributed in five text files and must be integrated into an Excel file. ' This package is protected by copyright law. © PhD Ariel R. Becerra B., 2022. ' By downloading the package you agree to the terms and conditions under the license GNU General Public License v.3.0 (https://www.gnu.org/licenses/gpl-3.0.html). ' You may use the ScienSolar package for free only under the terms of this license. ' For modeling, you do not need to program in VBA, it is enough with the Excel functions. ' TO MAKE IT WORK: ' 1. In a new Excel file, open the VBA Editor (Alt + F11 in Windows or Fn + Option + F11 in macOS). ' 2. In the VBAProject insert modules. Add six modules. ' 3. Copy and paste all the ScienSolar package code into the modules (the content of each file into a different module). ' 4. Add a button in a new sheet. To do this, in Excel, go to the DEVELOPER tab and in the Controls group click Insert a Button. ' 5. Click a location on the worksheet to place the button. ' 6. Assign the NewSheet macro to the button. ' 7. Click the button to start a new project. ' 8. To load a sample project, select it from the list and click the +Vector button. ' 9. Save the file in your desired folder, save it as Macro-Enabled Workbook (*. xlsm). ' 10. Some projects use objects (3D objects, formulas) found in the 3D Models spreadsheet. This spreadsheet can be downloaded and moved to this workbook (if not present). ' 11.Visit www.sciensolar.com to download updates and documentation. '//////////////////////////////////// ((((((())))))) \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Sub NewSheet() 'Segment NewSheet 01. Verificar y agregar CONFIG Application.ScreenUpdating = False Dim i As Integer Dim j As Integer Dim k As Integer Dim sheet As Object Dim nombre As Variant Dim Txt As String nombre = "CONFIG" For Each sheet In ThisWorkbook.Sheets If nombre = sheet.name Then GoTo salida End If Next sheet Sheets.Add ActiveSheet.name = "CONFIG" 'Datos para la primera columan de ayuda. Range("AA1").Value = "HELP MENU" Range("AA2").Value = "Pressing the ? button displays the help text for the active cell." Range("AA3").Value = "Al presionar el bot—n ? se muestra el texto de ayuda para la celda activa." Range("AA4").Value = "ADDRESS" Range("AA5").Value = "ZONE1" Range("AA6").Value = "ZONE2" Range("AA7").Value = "ZONE3" Range("AA8").Value = "ZONE4" Range("AA9").Value = "ZONE5" Range("AB1").FormulaR1C1 = "=IF(R[1]C[-11]=1,RC[3],IF(R[1]C[-11]=2,RC[4],IF(R[1]C[-11]=3,RC[5],IF(R[1]C[-11]=4,RC[6],IF(R[1]C[-11]=5,RC[7],IF(R[1]C[-11]=6,RC[8],RC[9]))))))" Range("AE1").Value = "HELP on a CELL: select it and press the question button. HELP on a BUTTON: select the cell under the button. To hide press the button located at F3. For quick help on a particular project, place the cursor over the HELP cell." Range("AF1").Value = "AYUDA sobre una CELDA: selecci—nela y oprima el bot—n de interrogaci—n. AYUDA sobre un BOTîN: seleccione la celda bajo el bot—n.Para ocultar presione el bot—n ubicado en F3. Para ayuda r‡pida sobre un proyecto en particular coloque el cursor sobre la celda HELP." Range("AC2").Value = "Celda libre, no est‡ ligada a ninguna funci—n especial de ScienSolar. " Range("AE4").Value = 1 Range("AF4").Value = 2 Range("AG4").Value = 3 Range("AH4").Value = 4 Range("AI4").Value = 5 Range("AJ4").Value = 6 Range("AK4").Value = 7 Range("AE3").FormulaR1C1 = "= R6C1" Range("AF3").FormulaR1C1 = "= R7C1" Range("AG3").FormulaR1C1 = "= R8C1" Range("AH3").FormulaR1C1 = "= R9C1" Range("AI3").FormulaR1C1 = "= R10C1" Range("AJ3").FormulaR1C1 = "= R11C1" Range("AK3").FormulaR1C1 = "= R12C1" Range("AC3").FormulaR1C1 = "= R13C1" Txt = Range("AC2").Value For i = 1 To 104 Cells(i + 9, 27).Value = "A" & i Cells(i + 113, 27).Value = "B" & i Cells(i + 217, 27).Value = "C" & i Next i k = 24 For i = 1 To 10 For j = 1 To 9 Cells(k, 32).FormulaR1C1 = "=R" & j + 14 & "C32" Cells(k + 104, 32).FormulaR1C1 = "=R" & j + 118 & "C32" Cells(k + 208, 32).FormulaR1C1 = "=R" & j + 222 & "C32" 'ENGLISH Cells(k, 31).FormulaR1C1 = "=R" & j + 14 & "C31" Cells(k + 104, 31).FormulaR1C1 = "=R" & j + 118 & "C31" Cells(k + 208, 31).FormulaR1C1 = "=R" & j + 222 & "C31" k = k + 1 Next j Next i For i = 1 To 41 Cells(i + 321, 27).Value = "D" & i Cells(i + 362, 27).Value = "E" & i Cells(i + 403, 27).Value = "F" & i Cells(i + 444, 27).Value = "G" & i Cells(i + 321, 32).Value = "CELDA D" & i & ". " & Txt Cells(i + 362, 32).Value = "CELDA E" & i & ". " & Txt Cells(i + 403, 32).Value = "CELDA F" & i & ". " & Txt Cells(i + 444, 32).Value = "CELDA G" & i & ". " & Txt 'ENGLISH. "Free cell." Cells(i + 321, 31).Value = "Free cell." Cells(i + 362, 31).Value = "Free cell." Cells(i + 403, 31).Value = "Free cell." Cells(i + 444, 31).Value = "Free cell." Next i k = 1 For j = 1 To 14 For i = 1 To 5 Cells(k + 485, 27).Value = Left(Cells(i, j + 7).Address(0, 0), 1) & i Cells(k + 485, 32).Value = "CELDA " & Left(Cells(i, j + 7).Address(0, 0), 1) & i & ". " & Txt Cells(k + 485, 31).Value = "Cell " & Left(Cells(i, j + 7).Address(0, 0), 1) & i & ". " & "Free cell." k = k + 1 Next i Next j 'Formula para elegir el idioma de ayuda For i = 5 To 555 Cells(i, 28).FormulaR1C1 = "=HLOOKUP(R2C17,R4C30:R800C37,RC[2])" Next i 'Formula para elegir el idioma de ayuda For i = 2 To 555 Cells(i + 3, 30).Value = i Next i 'ESPANOL. valores predeterminados para la columna A Range("AF5").Value = "COLUMNAS D y E est‡n disponibles para uso libre y alli se pueden introducir f—rmulas de Excel para los modelos." Range("AF6").Value = "COLUMNAS F y G est‡n disponibles para uso libre y pueden ser usadas para que el usuario ingrese par‡metros iniciales. La columna G tiene un formato condicional que cuando se ingresan datos su color de fondo cambia." Range("AF7").Value = "ZONA 3: COLUMNAS DESDE H HASTA U y desde la fila 5 hacia abajo. Esta zona es‡ dedicada al sistema de coordenadas . Todos los objetos que se configuren en las columnas A, B y C aparecer‡n en el sistema de coordendas en esta zona. En esta zona tambiŽn se pueden ubicar ecuaciones editadas en el editor de ecuaciones y guardadas en la hoja 3DModels, para ello escriba el nœmero de la ecuaci—n entre parŽntesis en el formato (Eq-3-1), en donde la expresi—n (Eq- al principio es obligatoria, seguida de cualquier valor numŽrico o letras. Para visualizar la ecuaci—n, se debe oprimir el correspondiente bot—n. Los botones para las ecuaciones para un proyecto nuevo aparecer‡n luego de exportar el c—digo e introducirlo a ScienSolar. " Range("AF8").Value = "ZONA 4. COLUMNAS DESDE V HASTA AC. Esta zona est‡ libre y puede dedicarse a escribir all’ la teor’a sobre el modelo o instrucciones de su ejecuci—n. En ella se puede escribir directamente texto en las celdas de la zona en blanco, La informaci—n ingresada en estas columnas se guardar‡ en el c—digo de cada proyecto." Range("AF9").Value = "ZONA 5: Esta zona comprende las columnas posteriores a la columna AD, y est‡n disponibles para que el usuario haga c‡lculos y coloque f—rmulas temporales. Sin embargo el c—digo del proyecto no exportar‡ los datos ni f—rmulas ingresados en esta zona, luego de oprimir el bot—n c—digo. " Range("AF10").Value = "Celda libre. " Range("AF11").Value = "Esta celda es usada por ScienSolar para inicializar el programa, por favor no elimine ni modifique el contenido de esta celda. " Range("AF12").Value = "Celda libre. " Range("AF13").Value = "Bot—n para exportar el c—digo del proyecto en curso. Este bot—n est‡ desdinado a exportar los proyectos nuevos o modificados en forma de c—digo VBA en un archivo de texto que se guarda en la misma carpeta en la que se encuentra el archivo ScienSolar. Lea las instrucciones en el encabezado del archivo exportado para saber c—mo se integra el proyecto a la lista de proyectos. Al oprimir el bot—n, le pedir‡ el nombre del archivo de texto que se guardar‡. Mientras no se copie el c—digo de un proyecto al editor de VBA este no aparecer‡ ni se modificar‡ en ScienSolar. La celda tambiŽn la utiliza el programa y contiene el nœmero del proyecto que se selecciona en la lista de proyectos." _ & "Observaci—n: Hay que tener en cuenta que al exportar el c—digo, algunos caracteres especiales (como tildes o s’mbolos) pueden no trabajar correctamente en algunos sistemas operativos. Se recomienda al exportar no incluir caracteres especiales en el nombre del archivo." Range("AF14").Value = "Esta celda est‡ ocupada y es usada para indicar el nœmero de vectores u objetos que se encuentran en el sistema de coordenadas. Este nœmero es utilizado por el c—digo para desplegar/recoger el menœ de configuraciones." Range("AF15").Value = "Cuando se carga un vector o un objeto al sistema de coordenadas, esta celda indica el nœmero del vector consecutivo. " _ & "La celda contiene adem‡s dos botones: el bot—n de la izquierda " _ & "se utiliza para activar/desactivar el grosor del vector y su historia. " _ & "El bot—n de la derecha se utiliza para comprimir o desplegar las celdas de configuraci—n de cada vector. " _ & "El bot—n del primer vector desplegar‡ o comprimir‡ la configuraci—n de todos los vectores." _ & "PROPIEDADES: El valor 0 en esta celda no pone el vector en el sistema de coordenadas, aunque s’ tiene en cuenta los " _ & "par‡metros y f—rmulas que se encuentran en su configuraci—n, lo cual tiene utilidad en algunos casos," _ & "por ejemplo cuando no se quiere visualizar el vector o cuando la cantidad de vectores es grande y se desea reducir el tiempo" _ & "de ejecuci—n. Los nœmeros en estas celdas deben ser consecutivos ascendentes y no se deben repetir." Range("AF16").Value = "Celda utilizada por ScienSolar para indicar si la configuraci—n del vector est‡ desplegada o plegada. El valor 0 indica plegada y el valor 1 desplegada. No modifique el valor de esta celda. " Range("AF17").Value = "El valor indicado aqu’ representa el nœmero de objetos (vectores) clonados para el vector dado. Cuando la opci—n de este vector es MODO CAMPO el nœmero es mayor que 1, de lo contrario es igual a 1. PROPIEDADES: Cuando se est‡ trabajando en modo campo y la cantidad de objetos cargados a la hoja es muy grande, para borrarlos inmediatamente se coloca en esta celda un nœmero mayor a 5000 y se oprime un bot—n de actualizaci—n. De otra manera no modifique esta celda." Range("AF18").Value = "Celda libre cuando se usa el vector (183). PROPIEDADES: Cuando se carga un objeto 3D (200) esta celda se usa para introducir el ‡ngulo de rotaci—n del objeto. Como ejemplo ver el vector nœmero 2 del proyecto Modelo 3D (oprimir Ejecutar en ese proyecto)." Range("AF19").Value = "Esta celda indica la posici—n inicial en el eje X del vector actual. Cuando se trabaja en modo CAMPO, el c—digo autom‡ticamente borra los datos de esta celda y los reemplaza por =A11, puesto que en A11 se recorrer‡n (en modo campo) todos los valores iniciales de las coordenadas en X de los vectores del campo. dados para un rango en la coordenada X. En esta celda el usuario puede introducir valores constantes as’ como funciones." _ & "Para ver como funciona, en una nueva hoja de ScienSolar agregue un nuevo vector y en A12 = 4, B12= 3, C12 = 0. Oprima XYZ, Ponga otros valores y observe los cambios en el sistema de coordenadas. " Range("AF20").Value = "Esta celda es usada por el c—digo cuando se trabaja en MODO CAMPO para recorrer todos los valores de las coordenadas como variables. Dicho de otra manera, esta celda equivale a la variable X cuando se trabaja con una funci—n f(x). Como ejemplo de uso de esta celda ver los proyectos DIPOLO ELƒCTRICO, SIMETRêA CILêNDRICA y SIMETRêA ESFƒRICA. Para campos escalares ver el proyecto FUNCIONES." Range("AF21").Value = "En esta celda se introduce el valor de la coordenada en el eje X del vector. Cuando se trabaja en MODO CAMPO, se introduce aqu’ la funci—n correspondiente al eje X del campo vectorial. Como ejemplo de uso de esta celda ver los proyectos DIPOLO ELƒCTRICO, SIMETRêA CILêNDRICA y SIMETRêA ESFƒRICA. Para campos escalares ver el proyecto FUNCIONES." Range("AF22").Value = "Cola del vector. Cuando se utiliza un vector convencional (183), se puede cambiar la forma de la cola del vector. Algunas otras formas diferentes a la 183 tambiŽn pueden obedecer a esta celda. Los valores permitidos son del 1 al 6. TambiŽn pueden introducirse funciones que cambien este valor autom‡ticamente." Range("AF23").Value = "Cabeza del vector. Cuando se utiliza un vector convencional (183), se puede cambiar la forma de la cabeza del vector. Algunas otras formas diferentes a la 183 tambiŽn pueden obedecer a esta celda. Los valores permitidos son del 1 al 6. TambiŽn pueden introducirse funciones que cambien este valor autom‡ticamente." 'ENGLISH: Range("AE5").Value = "COLUMNS D and E are available for free use and Excel formulas for the models can be entered there." Range("AE6").Value = "COLUMNS F and G are available for free use and can be used for the user to enter initial parameters. Column G has conditional formatting that when data is entered, its background color changes." Range("AE7").Value = "ZONE 3: COLUMNS FROM H TO U and row 5 down. This zone is dedicated to the coordinate system. All objects that are configured in columns A, B and C will appear in the coordinate system.system in this area, in this area you can also locate equations edited in the equation editor and saved in the 3DModels sheet, to do this write the equation number in parentheses in the format (Eq-3-1) , where the expression (Eq- at the beginning is required, followed by any numerical value or letter. To view the equation, you need to press the corresponding button. The buttons for the equations for a new project will appear after exporting the code and entering it into ScienSolar." Range("AE8").Value = "ZONE 4. COLUMNS FROM V TO AC. This area is free and can be dedicated to writing the theory about the model or instructions for its execution. In it you can write text directly in the cells. of the blank area, The information entered in these columns will be saved in the code of each project." Range("AE9").Value = "ZONE 5: This zone includes the columns after column AD and are available for the user to perform calculations and place temporary formulas. However, the project code will not export the data or formulas entered in this area, after pressing the code button." Range("AE10").Value = "Free cell." Range("AE11").Value = "ScienSolar uses this cell to initialize the program; do not delete or modify the contents of this cell." Range("AE12").Value = "Free cell." Range("AE13").Value = "Get Code Button. This button is intended to export new or modified projects in the form of VBA code in a text file that is saved in the same folder in which the ScienSolar file is located. Read the instructions in the header of the exported file to find out how the project is integrated into the project list. When you press the button, it will ask you for the name of the text file that will be saved. As long as the code of a project is not copied in the VBA editor, this will not appear or be modified in ScienSolar. The cell is also used by the program and contains the number of the project that is selected in the project list." _ & "Note: Keep in mind that when exporting the code, some special characters (such as accent marks or symbols) may not work correctly in some operating systems. It is recommended when exporting not to include special characters in the file name." Range("AE14").Value = "This cell is occupied and is used to indicate the number of vectors or objects that are in the coordinate system. This number is used by the code to display/collect the settings menu." Range("AE15").Value = "When a vector or object is loaded into the coordinate system, this cell indicates the number of the consecutive vector." _ & "The cell also contains two buttons: the button on the left " _ & "is used to enable/disable the vector thickness and its history." _ & "The button on the right is used to compress or expand the configuration cells of each vector." _ & "The first vector button will display or compress the settings for all vectors." _ & "PROPERTIES: The value 0 in this cell does not put the vector in the coordinate system, although it does take into account the " _ & "parameters and formulas found in its configuration, which is useful in some cases," _ & "for example when you do not want to display the vector or when the number of vectors is large and you want to reduce the execution time." _ & " The numbers in these cells must be consecutively ascending and must not be repeated." Range("AE16").Value = "This cell is used by ScienSolar to indicate whether the vector configuration is unfolded or folded. A value of 0 indicates folded and a value of 1 displays. Do not modify the value of this cell." Range("AE17").Value = "The value indicated here represents the number of objects (vectors) cloned for the given vector. When the option of this vector is FIELD MODE the number is greater than 1, otherwise it is equal to 1. PROPERTIES: When you are working in field mode and the number of objects loaded on the sheet is very large, to delete them immediately, place a number greater than 5000 in this cell and press an update button. Otherwise, do not modify this cell." Range("AE18").Value = "This cell is free when the vector (183) is used. PROPERTIES: When a 3D object is loaded (200) this cell is used to enter the rotation angle of the object. As an example see vector number 2 of the 3D Model project (press Run on that project)." Range("AE19").Value = "This cell indicates the initial position on the X axis of the current vector. When working in FIELD mode, the code automatically deletes the data in this cell and replaces it with =A11, since in A11 all the initial values of the X coordinates of the field vectors given for a range in the X coordinate will be traversed (in field mode). In this cell the user can enter constant values as well as functions." _ & "To see how it works, in a new ScienSolar sheet add a new vector and put in A12 = 4, B12 = 3, C12 = 0. Press XYZ, Put in other values and observe the changes in the coordinate system. " Range("AE20").Value = "This cell is used by the code when working in FIELD MODE to cycle through all the coordinate values as variables. In other words, this cell is equivalent to the variable X when working with a function f(x). As an example of using this cell, see the ELECTRIC DIPOLE, CYLINDRICAL SYMMETRY and SPHERICAL SYMMETRY projects. For scalar fields, see the FUNCTIONS project." Range("AE21").Value = "In this cell the value of the coordinate on the X axis of the vector is entered. When working in FIELD MODE, the function corresponding to the X axis of the vector field is entered here. As an example of use of this cell see the ELECTRICAL DIPOLE, CYLINDRICAL SYMMETRY and SPHERICAL SYMMETRY projects. For scalar fields see the FUNCTIONS project." Range("AE22").Value = "Vector tail. When using a conventional vector (183), the shape of the vector tail can be changed. Some shapes other than 183 can also obey this cell. The Allowed values are 1 to 6. Functions can also be introduced that change this value automatically." Range("AE23").Value = "Vector head. When using a conventional vector (183), the shape of the vector head can be changed. Some shapes other than 183 can also obey this cell. The Allowed values are 1 to 6. Formulas can also be entered that change this value automatically." 'ESPANOL valores predeterminados de layuda para la columna B: Range("AF114").Value = "Celda libre." ' B1 Range("AF115").Value = "Esta celda tiene como objetivo indicar la cantidad de objetos que desea agregar o eliminar presionando una vez el bot—n respectivo. Indique un nœmero entero o deje en blanco." 'B2 Range("AF116").Value = "En un proyecto en particular se pueden configurar paquetes de celdas que representen objetos m‡s complejos que un simple vector. Utilice estos botones para agregar o quitar estos objetos del modelo. Especifique en esta celda el nœmero de fila en el que empezar‡ el objeto. Para ver c—mo funciona este bot—n y esta celda, acuda al proyecto PIRçMIDE 3D. " 'B3 Range("AF117").Value = "Celda libre." 'B4 Range("AF118").Value = "Celda libre." 'B5 Range("AF119").Value = "ETIQUETA DEL VECTOR. Ingrese aqu’ la etiqueta del vector que aparecer‡ en el sistema de coordenadas al lado del vector. PROPIEDADES: Si no se introduce ningœn valor, el vector aparecer‡ sin etiqueta en el sistema de coordenadas. TambiŽn se pueden introducir funciones de etiquetas variables, ver ekjemplo en el proyecto CUADRUPOLO para etiquetas de las cargas q1, q2, q3, q4." Range("AF120").Value = "TIPO DE FORMA a representar en el sistema de coordenadas. La forma t’pica para ScienSolar es la de c—digo 183. " _ & "Esta forma est‡ elaborada en ScienSolar para que represente perfectamente a un vector. Sin embargo se pueden utlizar " _ & "otras formas para otros fines, pero cabe resaltar que para otros c—digos diferentes a 183 las rotaciones no funcionan correctamente. PROPIEDADES: se aceptan valores desde 1 hasta 183, " _ & "los valores negativos congelan sus dimensiones y no obedecen a la rotaci—n. Valor 183 para vectores. Valor 146 para un punto en el espacio. " _ & "Valor 200 para cargar un objeto 3D de la hoja 3DModels, con ello indicando en la etiqueta del vector el nombre del objeto (ver como ejemplo el vector 2 del proyecto MODELO 3D). " _ & "Para visualizar f‡cilmente todas las formas haga lo siguiente: oprima RESET (RESTABLECER), luego +VECTOR e introduzca los siguientes valores: B7 =I5, I3=1, I4=200, E5=60 y oprima " _ & "el bot—n --> para navegar por los diferentes valores de I5, es decir de B7. El valor B=-114 permite cargar un cuadro de texto con indicador " _ & "de una celda, por ejemplo B=-114 (negativo), B9=15 y C9=4 ubicar‡ el indicador en la celda que est‡ en la fila 15 y la columna 4." Range("AF121").Value = "TIPO DE LêNEA DEL VECTOR" & Chr(13) _ & "Para l’nea continua se introduce 1 y para diferentes tipos de l’nea punteada del 2 al 12." _ & Chr(13) & Chr(13) & "CONTROL DEL TAMA„O DEL VECTOR EN EL SISTEMA DE COORDENADAS" _ & Chr(13) & "Si el valor de esta celda es de la forma 60*4, en donde en lugar de 60 se introduce cualquier nœmero mayor que 15, se indica con esto el porcentaje del vector con respecto al tama–o de los ejes, y en lugar de 4 cualquier nœmero que indica el grado de agudeza con que la funci—n del campo cambia. Utilice esta configuraci—n especialmente en modo campo para controlar que el tama–o de los vectores no sobrepase el tama–o del sistema de coordenadas, y la funci—n campo adquiera suavidad. Controle esta suavidad con el segundo nœmero. Para que esta funci—n se active es necesario el formato 60*4 (el asterisco es oblicgatorio, y sin el signo igual)." _ & " Nota: esta funci—n puede cambiar la apriencia real de los vectores. " Range("AF122").Value = "Celda libre para la forma 183. Para la forma 200 se introduce aqu’ el otro ‡ngulo de rotaci—n del objeto 3D (ver proyecto MODELO 3D,vector2). Para la forma -114 se introduce aqu’ la fila de posici—n del indicador." Range("AF123").Value = "Esta celda indica la posici—n inicial en el eje Y del vector actual. Cuando se trabaja en modo CAMPO, el c—digo autom‡ticamente borra los datos de esta celda y los reemplaza por =B11, puesto que en B11 se recorrer‡n (en modo campo) todos los valores iniciales de las coordenadas en Y de los vectores del campo dados para un rango en la coordenada Y. En esta celda el usuario puede introducir valores constantes as’ como funciones." _ & "Para ver como funciona, en una nueva hoja de ScienSolar agregue un nuevo vector y en A12 = 4, B12= 3, C12 = 0. Oprima XYZ, Ponga otros valores y observe los cambios en el sistema de coordenadas. " Range("AF124").Value = "Esta celda es usada por el c—digo cuando se trabaja en MODO CAMPO para recorrer todos los valores de las coordenadas como variables. Dicho de otra manera, esta celda equivale a la variable y cuando se trabaja con una funci—n f(y). Como ejemplo de uso de esta celda ver los proyectos DIPOLO ELƒCTRICO, SIMETRêA CILêNDRICA y SIMETRêA ESFƒRICA. Para campos escalares ver el proyecto FUNCIONES." Range("AF125").Value = "En esta celda se introduce el valor de la coordenada en el eje Y del vector. Cuando se trabaja en MODO CAMPO, se introduce aqu’ la funci—n correspondiente al eje Y del campo vectorial. Como ejemplo de uso de esta celda ver los proyectos DIPOLO ELƒCTRICO, SIMETRêA CILêNDRICA y SIMETRêA ESFƒRICA. Para campos escalares ver el proyecto FUNCIONES." Range("AF126").Value = "NòMERO DE FILA para el inicio de una tabla de salida de datos durante la ejecuci—n de un modelo. El nœmero de columnas que tendr‡ la tabla es 9 con" _ & " las coordenadas iniciales, finales y dos celdas m‡s para f—rmulas adicionales. El nœmero de filas depende de la resoluci—n de toma de datos del problema en particular. " _ & "Para ver c—mo funciona esta celda oprima New Sheet (Nueva hoja) seleccione el proyecto MOVIMIENTO PARABîLICO de la lista y oprima +VECTOR, " _ & "luego, para el vector velocidad coloque B40=25, B41=7, D41=a y E41=b; oprima Ejecutar (Run). Aparecer‡, a partir de la celda indicada, una tabla con los datos de la simulaci—n. La tabla se" _ & "puede borrar simplemente seleccionando las respectivas celdas y oprimiendo SUPRIMIR en el teclado. En lugar de las letras a y b se pueden introducir otras funciones. " _ & "El valor 0 para esta celda deshabilita esta funci—n. Solo se aceptan valores numŽricos positivos. Los datos pueden ser usados para otros estudios en Excel u otros programas de an‡lisis de datos. " Range("AF127").Value = "NòMERO DE COLUMNA para el inicio de una tabla de salida de datos durante la ejecuci—n de un modelo. El nœmero de columnas que tendr‡ la tabla es 9 con" _ & " las coordenadas iniciales, finales y dos celdas m‡s para f—rmulas adicionales. El nœmero de filas depende de la resoluci—n de toma de datos del problema en particular. " _ & "Para ver c—mo funciona esta celda oprima New Sheet (Nueva hoja) seleccione el proyecto MOVIMIENTO PARABîLICO de la lista y oprima +VECTOR, " _ & "luego, para el vector velocidad coloque B40=25, B41=7, D41=a y E41=b; oprima Ejecutar (Run). Aparecer‡, a partir de la celda indicada, una tabla con los datos de la simulaci—n. La tabla se" _ & "puede borrar simplemente seleccionando las respectivas celdas y oprimiendo SUPRIMIR en el teclado. En lugar de las letras a y b se pueden introducir otras funciones. " _ & "El valor 0 para esta celda deshabilita esta funci—n. Solo se aceptan valores numŽricos positivos. Los datos pueden ser usados para otros estudios en Excel u otros programas de an‡lisis de datos. " 'ENGLISH Range("AE114").Value = "Free cell." 'B1 Range("AE115").Value = "This cell is intended to indicate the number of objects you want to add or delete by pressing the respective button once. Enter an integer or leave blank." 'B2 Range("AE116").Value = "In a particular project, packages of cells can be configured that represent more complex objects than a simple vector. Use these buttons to add or remove these objects from the model. Specify in this cell the row number at which the object will start. To see how this button and this cell work, go to the 3D PYRAMID project." 'B3 Range("AE117").Value = "Free cell." 'B4 Range("AE118").Value = "Free cell." 'B5 Range("AE119").Value = "VECTOR LABEL. Enter here the vector label that will appear in the coordinate system next to the vector. PROPERTIES: If no value is entered, the vector will appear without a label in the system. You can also introduce variable label functions, see example in the QUADRUPOLE project for labels of the electric charges q1, q2, q3, q4." Range("AE120").Value = "TYPE OF SHAPE to be represented in the coordinate system. The shape that is pre-established for ScienSolar is code 183." _ & "This shape is created in ScienSolar so that it perfectly represents a vector. However, you can use " _ & "other forms for other purposes, but it should be noted that for codes other than 183 the rotations do not work correctly. PROPERTIES: values from 1 to 183 are accepted, " _ & "negative values freeze their dimensions and do not obey rotation. Value 183 for vectors. Value 146 for a point in space. " _ & "Value 200 to load a 3D object from the 3DModels sheet, thereby indicating the name of the object in the vector label (see as an example vector 2 of the 3D MODEL project). " _ & "To easily view all shapes do the following: press RESET, then +VECTOR and enter the following values: B7 =I5, I3=1, I4=200, E5=60 and press " _ & "the button --> to navigate through the different values of I5, that is, B7. The value B=-114 allows loading a text box with indicator " _ & "of a cell, for example B=-114 (negative), B9=15 and C9=4 will place the text box indicator in the cell that is in row 15 and column 4." Range("AE121").Value = "VECTOR LINE TYPE" & Chr(13) _ & "For a solid line, enter 1 and for different types of dotted lines, enter 2 to 12." _ & Chr(13) & Chr(13) & "CONTROL OF THE VECTOR SIZE IN THE COORDINATE SYSTEM" _ & Chr(13) & "Change the size of the vectors by entering in the value of this cell an expression of the form 60*4, where instead of 60 any number greater than 15 is entered, thus indicating the percentage of the vector with respect to the size of the axes, and instead of 4 any number that indicates how sharply the field function changes. Use this setting especially in field mode to control that the size of the vectors does not exceed the size of the system coordinates, and the function of the field is controlled with the second number. For this function to be activated, the format 60*4 is required (the asterisk is mandatory, and without the equal sign)." _ & " Remark: This function can change the actual appearance of the vectors. " Range("AE122").Value = "Free cell for shape 183. For shape 200, the other rotation angle of the 3D object is entered here (see 3D MODEL project, vector2). For shape -114, the indicator position row." Range("AE123").Value = "This cell indicates the initial position on the Y axis of the current vector. When working in FIELD mode, the code automatically deletes the data in this cell and replaces it with =B11, since in B11 all the initial values of the Y coordinates of the given field vectors will be traversed (in field mode) for a range in the Y coordinate. In this cell the user can enter constant values as well as functions." _ & "To see how it works, in a new ScienSolar sheet add a new vector and put in A12 = 4, B12 = 3, C12 = 0. Press XYZ, Put in other values and observe the changes in the coordinate system. " Range("AE124").Value = "This cell is used by the code when working in FIELD MODE to cycle through all coordinate values as variables. In other words, this cell is equivalent to the Y variable when working with a function f(y). As an example of using this cell, see the ELECTRIC DIPOLE, CYLINDRICAL SYMMETRY and SPHERICAL SYMMETRY projects. For scalar fields, see the FUNCTIONS project." Range("AE125").Value = "In this cell the value of the coordinate on the Y axis of the vector is entered. When working in FIELD MODE, the function corresponding to the Y axis of the vector field is entered here. As an example of use of this cell see the ELECTRICAL DIPOLE, CYLINDRICAL SYMMETRY and SPHERICAL SYMMETRY projects. For scalar fields see the FUNCTIONS project." Range("AE126").Value = "ROW NUMBER for the start of a data output table during the execution of a model. The number of columns the table will have is 9 with" _ & " the initial and final coordinates and two more cells for additional formulas. The number of rows depends on the data collection resolution of the particular problem. " _ & "To see how this cell works press New Sheet, select the PARABOLIC MOTION project from the list and press +VECTOR, " _ & "then, for the velocity vector, place B40=25, B41=7, D41=a and E41=b; press Run. A table with the simulation data will appear from the indicated cell. The table " _ & "can be deleted simply by selecting the respective cells and pressing DELETE on the keyboard. Other functions can be entered instead of the letters a and b. " _ & "The value 0 for this cell disables this function. Only positive numerical values are accepted. The data can be used for other studies in Excel or other data analysis programs." Range("AE127").Value = "COLUMN NUMBER for the start of a data output table during the execution of a model. The number of columns the table will have is 9 with" _ & " the initial and final coordinates and two more cells for additional formulas. The number of rows depends on the data collection resolution of the particular problem. " _ & "To see how this cell works press New Sheet, select the PARABOLIC MOTION project from the list and press +VECTOR, " _ & "then, for the velocity vector, place B40=25, B41=7, D41=a and E41=b; press Run. A table with the simulation data will appear from the indicated cell. The table HE" _ & "can be deleted simply by selecting the respective cells and pressing DELETE on the keyboard. Other functions can be entered instead of the letters a and b. " _ & "The value 0 for this cell disables this function. Only positive numerical values are accepted. The data can be used for other studies in Excel or other data analysis programs." 'valores predeterminados de layuda para la columna C: Range("AF218").Value = "Celda libre." ' C1 Range("AF219").Value = "Celda libre." 'C2 Range("AF220").Value = "En un proyecto en particular se pueden configurar paquetes de celdas que representen objetos m‡s complejos que un simple vector. Utilice estos botones para agregar o quitar estos objetos del modelo. Especifique en esta celda el nœmero de fila en el que empezar‡ el objeto. Para ver c—mo funciona este bot—n y esta celda, acuda al proyecto PIRçMIDE 3D. " 'C3 Range("AF221").Value = "Etiqueta predeterminada del vector nuevo que se va a descargar. Esta celda no requiere ninguna acci—n. Para ver como funciona, en una nueva hoja escriba en esta celda la letra E y oprima +Vector." 'C4 Range("AF222").Value = "Celda libre." 'C5 Range("AF223").Value = "Color del vector o de la forma que se carge al sistema de coordenadas. Cambie el color de fondo de esta celda con la respectiva herramienta de Excel" _ & " y cambiar‡ el color del vector (luego de oprimir XYZ). Esta celda est‡ libre para utilizarla con datos o f—rmulas. Para ver c—mo fuciona, " _ & "en una nueva hoja de ScienSolar oprima +Vector, luego cambie el color de esta celda y oprima XYZ. Cambie el c—digo de la forma a 114 (en lugar de 183), oprima YZ, cambie el color y vuelva a oprimir YZ." Range("AF224").Value = "MODO CAMPO. Posibles valores:" _ & Chr(13) & "o --> coordenadas cartesianas," _ & Chr(13) & "c --> coordenadas cil’ndricas," _ & Chr(13) & "s --> coordenadas esfŽricas," _ & Chr(13) & "vac’a --> modo campo deshabilitado." _ & Chr(13) & Chr(13) & "Una vez ingresado uno de estos valores (en minœscula y sin el signo igual), oprimiendo XYZ aparecer‡ una cadena de valores que se explica a continuaci—n. Se deben modificar œnicamente los valores entre corchetes de acuerdo a las unidades de las coordenadas:" _ & Chr(13) & Chr(13) & "COORDENADAS CARTESIANAS:" _ & Chr(13) & "o[5]x=[40;40] --> paso y rango en x," _ & Chr(13) & "o2[20]y=[-100;100] --> paso y rango en y," _ & Chr(13) & "o3[40]z=[0;100] --> paso y rango en z," _ & Chr(13) & Chr(13) & "COORDENADAS CILêNDRICAS:" _ & Chr(13) & "c[5]rho=[40;40] --> paso y rango en rho," _ & Chr(13) & "c2[20]phi=[0;360] --> paso y rango en phi," _ & Chr(13) & "c3[40]z=[0;100] --> paso y rango en z," _ & Chr(13) & Chr(13) & "COORDENADAS ESFƒRICAS:" _ & Chr(13) & "s[5]r=[40;40] --> paso y rango en r," _ & Chr(13) & "s2[20]phi=[180;270] --> paso y rango en phi," _ & Chr(13) & "s3[5]theta=[0;90] --> paso y rango en theta," _ & Chr(13) & Chr(13) & "color=[80] --> magnitud aproximada del mayor vector para distribuir el gradiente de color en todos los vectores de acuerdo a su magnitud," _ & Chr(13) & "[cart.]=[0;0;0] --> corrimiento del origen de coordenadas con respecto al original," _ & Chr(13) & "tfactor=0,001386089s --> informaci—n del tiempo de puesta de un solo vector en la hoja. No requiere ninguna acci—n." _ & Chr(13) & Chr(13) & "PROPIEDADES: Esta celda s—lo puede ser usada para clonar los vectores en el espacio tridimensional. Cuando est‡ vac’a, su funci—n se inactiva. La distribuci—n de los vectores se puede hacer de tres maneras" _ & ": a travŽs de coordenadas cartesianas, cil’ndricas o esfŽricas. Ejemplos de aplicaci—n de esta funci—n se pueden ver en en el vector 5 del proyecto DIPOLO ELƒCTRICO y una forma m‡s avanzada de su uso en los proyectos" _ & " DIPOLO ELƒCTRICO, SIMETRêA PLANA, SIMETRêA CILêNDRICA y SIMETRêA ESFƒRICA." Range("AF225").Value = "Transparencia del vector en curso. Se aceptan valores positivos decimales desde 0 hasta 1, en donde con el valor 0 no tiene transparencia y con el valor 1 su transparencia es total. Esta funci—n es œtil por ejemplo para vectores auxiliares que no hacen parte del problema directamente. " Range("AF226").Value = "Celda libre para la forma 183. Para la forma -114 se introduce aqu’ la columna de posici—n del indicador (la fila se introduce en la celda contigua de la izquierdda.) " _ & Chr(13) & Chr(13) & "Para ver c—mo funciona, abra una nueva hoja de ScienSolar, oprima +Vector para agregar un nuevo vector y coloque (con signo menos) B7=-114, B9=6,C9=3 con el prop—sito de apuntar a la celda del color. " _ & "Oprima YZ para ver el resultado. Cambie los valores B9=8,C9=5 para apuntar a la celda que se encuentra en la fila 8, columna 5. Coloque B10=3 C10=3 para cambiar la posici—n del cuadrado. " _ & "Coloque B12=8, C12=3 para cambiar su tama–o. Oprima YZ para ver el resultado. Oprima >>C para rotar el sistema de coordenadas. Quite el signo menos en B7, B7=114. Oprima de nuevo >>C para ver la diferencia." Range("AF227").Value = "Esta celda indica la posici—n inicial en el eje Z del vector actual. Cuando se trabaja en modo CAMPO, el c—digo autom‡ticamente borra los datos de esta celda y los reemplaza por =C11, puesto que en C11 se recorrer‡n (en modo campo) todos los valores iniciales de las coordenadas en Z de los vectores del campo dados para un rango en la coordenada Z. En esta celda el usuario puede introducir valores constantes as’ como funciones." _ & Chr(13) & Chr(13) & " Para ver como funciona, en una nueva hoja de ScienSolar agregue un nuevo vector y en A12 = 4, B12= 3, C12 = 0. Oprima XYZ. Ponga otros valores y observe los cambios en el sistema de coordenadas. " Range("AF228").Value = "Esta celda es usada por el c—digo cuando se trabaja en MODO CAMPO para recorrer todos los valores de las coordenadas como variables. Dicho de otra manera, esta celda equivale a la variable z cuando se trabaja con una funci—n f(z). Como ejemplo de uso de esta celda ver los proyectos DIPOLO ELƒCTRICO, SIMETRêA CILêNDRICA y SIMETRêA ESFƒRICA. Para campos escalares ver el proyecto FUNCIONES." Range("AF229").Value = "En esta celda se introduce el valor de la coordenada en el eje Z del vector. Cuando se trabaja en MODO CAMPO, se introduce aqu’ la funci—n correspondiente al eje Z del campo vectorial. Como ejemplo de uso de esta celda ver los proyectos DIPOLO ELƒCTRICO, SIMETRêA CILêNDRICA y SIMETRêA ESFƒRICA. Para campos escalares ver el proyecto FUNCIONES." Range("AF230").Value = "Celda de HISTORIA del vector. Posibles valores 1 y 2. " _ & "Con el valor 2 el vector dejar‡ huella de su recorrido en la hoja de c‡lculo, lo cual es visible cuando el vector cambia de posici—n. Cuando se coloca el valor 1 despuŽs de haber tenido el valor 2, los vectores antiguos ir‡n desapareciendo de forma paulatina cuando se ejecuta alguna acci—n. " _ & Chr(13) & Chr(13) & "Para ver como trabaja, en una hoja nueva de ScienSolar agrege un vector (oprimiendo el bot—n +Vector) e ingrese el nœmero 2 en la celda C13=2. Oprima el bot—n de rotaci—n >>C. Ahora cambie las posiciones iniciales del vector y sus coordenadas y vuelva a oprimir >>C. " _ & "Observar‡ que aparece en el sistema de coordenadas un abanico de vectores. Posteriormente ingrese C13=1 y oprima >>C para ver desaparecer los vectores paulatinamente. Oprima de nuevo >>C para su total desaparici—n. " _ & "Si desea que los vectores desaparezcan instant‡neamente, debe colocar en la celda A8 un valor mayor a 5000, por ejemplo A8=6000 y oprimir cualquier bot—n de actualizaci—n. " Range("AF231").Value = "Grosor del vector. El valor predeterminado es 1. Para vectores m‡s gruesos coloque un valor mayor que 1. Aqu’, como en otras celdas de configuraci—n, se pueden ingresar f—rmulas din‡micas que cambian la apariencia de los vectores dependiendo de ciertos par‡metros particulares para cada proyecto. " 'ENGLISH Range("AE218").Value = "Free cell." ' C1 Range("AE219").Value = "Free cell." 'C2 Range("AE220").Value = "In a particular project, packages of cells can be configured that represent more complex objects than a simple vector. Use these buttons to add or remove these objects from the model. Specify in this cell the row number at which the object will end. To see how this button and this cell work, go to the 3D PYRAMID project." Range("AE221").Value = "Default label of the new vector to be downloaded. This cell requires no action. To see how this works, in a new sheet, type the letter E in this cell and press +Vector." 'C4 Range("AE222").Value = "Free cell." 'C5 Range("AE223").Value = "Color of the vector or shape that is loaded into the coordinate system. Change the background color of this cell with the respective Excel tool" _ & " and will change the color of the vector (after pressing XYZ). This cell is free to use with data or formulas. To see how it works, " _ & "in a new ScienSolar sheet press +Vector, then change the color of this cell and press XYZ. Change the shape code to 114 (instead of 183), press YZ, change the color and press YZ again. " Range("AE224").Value = "FIELD MODE. Possible values:" _ & Chr(13) & "o --> Cartesian Coordinates," _ & Chr(13) & "c --> Cylindrical Coordinates," _ & Chr(13) & "s --> Spherical Coordinates," _ & Chr(13) & "empty --> Field Mode disabled." _ & Chr(13) & Chr(13) & "Once one of these values has been entered (in lower case and without the equal sign), pressing XYZ will display a string of values explained below. Only the values in brackets should be modified according to the units of the coordinates:" _ & Chr(13) & Chr(13) & "CARTESIAN COORDINATES:" _ & Chr(13) & "o[5]x=[40;40] --> Step and range in x," _ & Chr(13) & "o2[20]y=[-100;100] --> Step and range in y," _ & Chr(13) & "o3[40]z=[0;100] --> Step and range in z," _ & Chr(13) & Chr(13) & "CYLINDRICAL COORDINATES:" _ & Chr(13) & "c[5]rho=[40;40] --> Step and range in rho," _ & Chr(13) & "c2[20]phi=[0;360] --> Step and range in phi," _ & Chr(13) & "c3[40]z=[0;100] --> Step and range in z," _ & Chr(13) & Chr(13) & "SPHERICAL COORDINATES:" _ & Chr(13) & "s[5]r=[40;40] --> Step and range in r," _ & Chr(13) & "s2[20]phi=[180;270] --> Step and range in phi," _ & Chr(13) & "s3[5]theta=[0;90] --> Step and range in theta," _ & Chr(13) & Chr(13) & "color=[80] --> Approximate magnitude of the largest vector to distribute the color gradient in all vectors according to their magnitude," _ & Chr(13) & "[cart.]=[0;0;0] --> Shift of the origin of coordinates with respect to the original," _ & Chr(13) & "tfactor=0.001386089s --> Information on the time of placing a single vector on the sheet. No action required." _ & Chr(13) & Chr(13) & "PROPERTIES: This cell can only be used to clone the vectors in three-dimensional space. When it is empty, its function is inactive. The distribution of the vectors can be done in three ways" _ & ": through Cartesian, cylindrical or spherical coordinates. Examples of application of this function can be seen in vector 5 of the ELECTRIC DIPOLE project and a more advanced form of its use in projects" _ & "ELECTRIC DIPOLE, PLANE SYMMETRY, CYLINDRICAL SYMMETRY and SPHERICAL SYMMETRY." Range("AE225").Value = "Transparency of the current vector. Positive decimal values are accepted from 0 to 1, where with the value 0 it has no transparency and with the value 1 its transparency is total. This function is useful for example for auxiliary vectors that are not directly part of the problem." Range("AE226").Value = "Free cell for form 183. For form -114, the indicator position column is entered here (the row is entered in the adjacent cell on the left.) " _ & Chr(13) & Chr(13) & "To see how it works, open a new ScienSolar sheet, press +Vector to add a new vector and place (with minus sign) B7=-114, B9=6,C9= 3 for the purpose of targeting the color cell." _ & "Press YZ to see the result. Change the values B9=8,C9=5 to point to the cell in row 8, column 5. Set B10=3 to C10=3 to change the position of the square." _ & "Set B12=8, C12=3 to resize. Press YZ to see the result. Press >>C to rotate the coordinate system. Remove the minus sign at B7, B7=114. Press >>C again to see the difference." Range("AE227").Value = "This cell indicates the initial position on the Z axis of the current vector. When working in FIELD mode, the code automatically deletes the data in this cell and replaces it with =C11, since in C11 will traverse (in field mode) all the initial values of the Z coordinates of the given field vectors for a range in the Z coordinate. In this cell the user can enter constant values as well as functions." _ & Chr(13) & Chr(13) & " To see how it works, in a new ScienSolar sheet add a new vector and set A12 = 4, B12 = 3, C12 = 0. Press the XYZ button. Enter other values and observe the changes in the coordinate system." Range("AE228").Value = "This cell is used by the code when working in FIELD MODE to cycle through all the coordinate values as variables. In other words, this cell is equivalent to the variable z when working with a function f(z). As an example of using this cell, see the ELECTRICAL DIPOLE, CYLINDRICAL SYMMETRY and SPHERICAL SYMMETRY projects. For scalar fields, see the FUNCTIONS project." Range("AE229").Value = "In this cell the value of the coordinate on the Z axis of the vector is entered. When working in FIELD MODE, the function corresponding to the Z axis of the vector field is entered here. As an example of use of this cell see the ELECTRICAL DIPOLE, CYLINDRICAL SYMMETRY and SPHERICAL SYMMETRY projects. For scalar fields see the FUNCTIONS project." Range("AE230").Value = "Vector HISTORY cell. Possible values 1 and 2. " _ & "With the value 2 the vector will leave a trace of its path in the spreadsheet, which is visible when the vector changes position. When the value 1 is placed after having had the value 2, the old vectors will disappear from gradually when some action is executed." _ & Chr(13) & Chr(13) & "To see how it works, in a new ScienSolar sheet add a vector (by pressing the +Vector button) and enter the number 2 in cell C13=2. Press the rotate button >>C. Now change the initial positions of the vector and its coordinates and press >>C again. " _ & "You will notice that a set of vectors appears in the coordinate system. Then enter C13=1 and press >>C to see the vectors gradually disappear. Press >>C again for their complete disappearance. " _ & "If you want the vectors to disappear instantly, you must enter a value greater than 5000 in cell A8, for example A8=6000, and press any refresh button." Range("AE231").Value = "Vector thickness. The default value is 1. For thicker vectors enter a value greater than 1. Here, as in other configuration cells, dynamic formulas can be entered that change the appearance of the vectors depending on certain particular parameters for each project." 'valores predeterminados de layuda para la columna D Range("AF323").Value = "Celda utilizada por el bot—n B/W para indicar el formato del fondo de la hoja. Oprima B/W para ver los cambios, este proceso no afecta en escencia los proyectos, sino que permite cambiar su apariencia. Las apariencias del fondo se pueden guardar en el c—digo de los proyectos. " Range("AE323").Value = "Cell used by the B/W button to indicate the format of the sheet background. Press B/W to see the changes, this process does not essentially affect the projects, but rather allows you to change its appearance. Background appearances can be saved in the projects code." 'valores predeterminados de layuda para la columna E Range("AF365").Value = "Posici—n horizontal, en puntos de Excel, del origen de coordenadas. Cada proyecto puede personalizar y guardar este valor en el c—digo. Al cambar este valor, autom‡ticamente se actualizar‡n las posiciones de los objetos que se encuetran en el sistema de coordenadas. Las unidades en las que tranbaja ScienSolar es en puntos. Para visualizar su magnitud, oprima YZ y ver‡ la longitud del eje correspondiente a la mostrada en la celda Longitud de los ejes. " _ & Chr(13) & "Los valores predeterminados y el lenguaje del panel del control se pueden personalizar en la hoja CONFIG." Range("AF366").Value = "Posici—n vertical, en puntos de Excel, del origen de coordenadas. Cada proyecto puede personalizar y guardar este valor en el c—digo. Al cambar este valor, autom‡ticamente se actualizar‡n las posiciones de los objetos que se encuentresn en el sistema de coordenadas. Las unidades en las que tranbaja ScienSolar es en puntos. Para visualizar su magnitud, oprima YZ y ver‡ la longitud del eje correspondiente a la mostrada en la celda Longitud de los ejes." _ & Chr(13) & "Los valores predeterminados y el lenguaje del panel del control se pueden personalizar en la hoja CONFIG, en la misma celda." Range("AF367").Value = "Escala de los vectores u objetos que se encuentran en el sistema de coordenadas. El valor 1 corresponde a la escala 1:1, es decir que los vectores est‡n en la misma escala de los ejes de coordenadas; un valor mayor a 1 quiere decir que las coordenadas y posiciones de los vectores se multiplicar‡n por ese valor. Se pueden utilizar tambiŽn valores fraccionarios. Esta celda se utiliza en algunos casos para ajustar el proyecto al sistema de coordenadas." _ & Chr(13) & "Los valores predeterminados y el lenguaje del panel del control se pueden personalizar en la hoja CONFIG." Range("AF368").Value = "Longitud de los ejes en puntos de Excel. Para visualizar su magnitud, oprima YZ y ver‡ la longitud del eje correspondiente a la mostrada en esta celda. Todos los ejes tienen la misma longitud. Este valor puede personalizarse para cada proyecto." Range("AE365").Value = "Horizontal position, in Excel points, of the coordinate origin. Each project can customize and save this value in the code. Changing this value will automatically update the positions of the system objects " _ & Chr(13) & "The default values and language of the control panel can be customized in the CONFIG sheet." Range("AE366").Value = "Vertical position, in Excel points, of the coordinate origin. Each project can customize and save this value in the code. Changing this value will automatically update the positions of the system objects of coordinates. The units in which ScienSolar works is in points. To view its magnitude, press YZ and you will see the length of the axis corresponding to that shown in the Length of the axes cell." _ & Chr(13) & "The default values and language of the control panel can be customized in the CONFIG sheet," Range("AE367").Value = "Scale of the vectors or objects that are in the coordinate system. The value 1 corresponds to the 1:1 scale, that is, the vectors are on the same scale as the axes of coordinates; a value greater than 1 means that the coordinates and positions of the vectors will be multiplied by that value. Fractional values can also be used. This cell is used in some cases to adjust the project to the coordinate system." _ & Chr(13) & "The default values and language of the control panel can be customized on the CONFIG sheet, in the same cell." Range("AE368").Value = "Length of the axes in Excel points. To view their magnitude, press YZ and you will see the length of the axis corresponding to the one shown in this cell. All axes have the same length. This value can be customized for each project." 'valores predeterminados de layuda para la columna F Range("AF405").Value = "Bot—n B/W (Black / White). Este bot—n permite cambiar el color del fondo del sistema de coordenadas. Existen tres configuraciones del fondo. El bot—n se puede usar en cualquier momento durante el trabajo con los proyectos y no influye sobre las ecuaciones ni los datos. TambiŽn es posible guardar alguna de las tres configuraciiones en el c—digo para cada proyecto, de tal manera que cuando se cargue el proyecto lo haga con su fondo personalizado. Este bot—n est‡ vinculado a la celda D2 para su correcto funcionamiento." Range("AF406").Value = "COLOR de las ETIQUETAS. ACTUALIZAR HOJA. Con la herramienta convencional de Excel cambie el color de fondo de esta celda y con ello cambiar‡ el color de todas las etiquetas de los objetos que se encuentran en la hoja, incluyendo las etiquetas de los ejes. Para invisibilizar las etiquetas ponga un color igual al color del fondo. El bot—n que aparece en esta celda se utiliza para actualizar cambios que se hayan hecho en la configuraci—n del proyecto o luego de ingresar de datos. " Range("AF407").Value = "NOMBRE y COLOR del EJE X. ROTACIîN en X. Con la herramienta convencinal de Excel cambie el color de fondo de esta celda para cambiar el color del eje X. TambiŽn puede personalizar el nombre del eje X. Para invisibilizar el eje ponga aqu’ el mismo color del fondo. El bot—n >>A rotar‡ consecutivamente el sistema de coordenadas alrededor del eje X (en la posici—n YZ) el nœmero de veces indicado en la celda I4 con un paso en grados indicado en la celda I3." Range("AF408").Value = "NOMBRE y COLOR del EJE Y. ROTACIîN en Y. Con la herramienta convencinal de Excel cambie el color de fondo de esta celda para cambiar el color del eje Y. TambiŽn puede personalizar el nombre del eje Y. Para invisibilizar el eje ponga aqu’ el mismo color del fondo. El bot—n >>B rotar‡ consecutivamente el sistema de coordenadas alrededor del eje Y (en la posici—n YZ) el nœmero de veces indicado en la celda I4 con un paso en grados indicado en la celda I3." Range("AF409").Value = "NOMBRE y COLOR del EJE Z. ROTACIîN en Z. Con la herramienta convencinal de Excel cambie el color de fondo de esta celda para cambiar el color del eje Z. TambiŽn puede personalizar el nombre del eje Z. Para invisibilizar el eje ponga aqu’ el mismo color del fondo. El bot—n >>C rotar‡ consecutivamente el sistema de coordenadas alrededor del eje Z (en la posici—n YZ) el nœmero de veces indicado en la celda I4 con un paso en grados indicado en la celda I3." Range("AE405").Value = "B/W (Black / White) button. This button allows you to change the background color of the coordinate system. There are three background settings. The button can be used at any time during work with the projects and does not influence the equations or the data. It is also possible to save any of the three configurations in the code for each project, so that when the project is loaded it does so with its personalized background. This button is linked to cell D2 for correct operation." Range("AE406").Value = "COLOR of the LABELS. UPDATE SHEET. With the conventional Excel tool change the background color of this cell and with this it will change the color of all the labels of the objects that are in the sheet, including the axis labels. To make the labels invisible, set a color equal to the background color. The button that appears in this cell is used to update changes that have been made in the project configuration or after entering data. " Range("AE407").Value = "NAME and COLOR of the X AXIS. ROTATION in X. With the Excel conventional tool change the background color of this cell to change the color of the X axis. You can also customize the name of the axis X. To make the axis invisible, put the same background color here. The >>A button will consecutively rotate the coordinate system around the X axis (in the YZ position) the number of times indicated in cell I4 with a step in degrees indicated in cell I3" Range("AE408").Value = "NAME and COLOR of the Y AXIS. ROTATION in Y. With the Excel conventional tool change the background color of this cell to change the color of the Y axis. You can also customize the name of the axis Y. To make the axis invisible, put the same background color here. The >>B button will consecutively rotate the coordinate system around the Y axis (in the YZ position) the number of times indicated in cell I4 with a step in degrees indicated in cell I3." Range("AE409").Value = "NAME and COLOR of the Z AXIS. ROTATION in Z. With the Excel conventional tool change the background color of this cell to change the color of the Z axis. You can also customize the name of the axis Z. To make the axis invisible, put the same background color here. The >>C button will consecutively rotate the coordinate system around the Z axis (in the YZ position) the number of times indicated in cell I4 with a step in degrees indicated in cell I3." 'valores predeterminados de layuda para la columna G Range("AF446").Value = "Vista XYZ personalizada, con rotaci—n en x de o, en y de 15 y en z de 15 grados. " _ & Chr(13) & "Vista YZ personalizada, con rotaci—n en x de 0, en y de 0 y en z de 0 grados. " _ & Chr(13) & "Los valores predeterminados y el lenguaje del panel del control se pueden personalizar en la hoja CONFIG, en la misma celda." Range("AF447").Value = "Vista XY personalizada desde ARRIB con rotaci—n en x de 0, en y de 90 y en z de 0 grados. " _ & Chr(13) & "Vista XZ personalizada, con rotaci—n en x de 0, en y de 0 y en z de 90 grados. " _ & Chr(13) & "Los valores predeterminados y el lenguaje del panel del control se pueden personalizar en la hoja CONFIG." Range("AF448").Value = "Vista personalizada de rotaci—n en X. Luego de personalizar el ‡ngulo de rotaci—n en X (en grados), para ver los cambios oprima el bot—n ubicado en F3." _ & Chr(13) & "Los valores predeterminados y el lenguaje del panel del control se pueden personalizar en la hoja CONFIG." Range("AF449").Value = "Vista personalizada de rotaci—n en Y. Luego de personalizar el ‡ngulo de rotaci—n en Y (en grados), para ver los cambios oprima el bot—n ubicado en F3." _ & Chr(13) & "Los valores predeterminados y el lenguaje del panel del control se pueden personalizar en la hoja CONFIG." Range("AF450").Value = "Vista personalizada de rotaci—n en Z. Luego de personalizar el ‡ngulo de rotaci—n en Z (en grados), para ver los cambios oprima el bot—n ubicado en F3." _ & Chr(13) & "Los valores predeterminados y el lenguaje del panel del control se pueden personalizar en la hoja CONFIG." Range("AF451").Value = "MENò DE AYUDA: " _ & Chr(13) & " 1. Seleccione la celda de la que necesita ayuda." _ & Chr(13) & " 2. Oprima el bot—n de ayuda (?)." _ & Chr(13) & " 3. Para ayuda sobre un bot—n seleccione la celda bajo este y oprima el bot—n de ayuda (?)." _ & Chr(13) & " 4. Para ocultar la ayuda oprima el bot—n que se encuentra en F3." _ & Chr(13) & Chr(13) & " Para consultar sobre un proyecto espec’fico, coloque el cursor sobre la celda HELP y lea el comentario emergente." Range("AE446").Value = "Custom XYZ view, with rotation in x of 0, in y of 15 and in z of 15 degrees. " _ & Chr(13) & "Custom YZ view, with rotation in x of 0, in y of 0 and in z of 0 degrees. " _ & Chr(13) & "The default values and language of the control panel can be customized in the CONFIG sheet." Range("AE447").Value = "Custom XY view from ABOVE with rotation in x of 0, in y of 90 and in z of 0 degrees. " _ & Chr(13) & "Custom XZ view, with rotation in x of 0, in y of 0 and in z of 90 degrees. " _ & Chr(13) & "The default values and language of the control panel can be customized in the CONFIG sheet." Range("AE448").Value = "Custom X rotation view. After customizing the X rotation angle (in degrees), to see the changes press the button located at F3." _ & Chr(13) & "The default values and language of the control panel can be customized in the CONFIG sheet." Range("AE449").Value = "Custom Y rotation view. After customizing the Y rotation angle (in degrees), to see the changes press the button located at F3." _ & Chr(13) & "The default values and language of the control panel can be customized in the CONFIG sheet." Range("AE450").Value = "Custom Z rotation view. After customizing the Z rotation angle (in degrees), to see the changes press the button located at F3." _ & Chr(13) & "The default values and language of the control panel can be customized in the CONFIG sheet." Range("AE451").Value = "HELP MENU: " _ & Chr(13) & " 1. Select the cell you need help with." _ & Chr(13) & " 2. Press the help button (?)." _ & Chr(13) & " 3. For help on a button, select the cell below it and press the help button (?)." _ & Chr(13) & " 4. To hide the help press the button located at F3." _ & Chr(13) & Chr(13) & " To inquire about a specific project, place the cursor over the HELP cell and read the pop-up comment." 'valores predeterminados de layuda para la columna I Range("AF493").Value = "En esta celda se introduce el valor del paso para una simulaci—n din‡mica, en donde cierto par‡metro del modelo puede cambiar consecutivamente, como por ejemplo el par‡metro del tiempo, en este caso aqu’ se introduce la unidad del tiempo, es decir 1. De forma preestablecida se introduce el valor predeterminado en la hoja CONFIG, pero usted puede cambiar este valor por el que sea necesario para su modelo. El nœmero 8 preestablecido corresponde a 8 grados, pues 8 x 45 = 360, lo cual se utiliza frecuentemente para la rotaci—n de los ejes." Range("AF494").Value = "En esta celda se introduce el nœmero de pasos para una simulaci—n din‡mica, en donde cierto par‡metro del modelo puede cambiar consecutivamente, como por ejemplo el par‡metro del tiempo, en este caso aqu’ se introduce la cantidad de segundos que durar‡ la simulaci—n, por defecto 45. De forma preestablecida se introduce el valor predeterminado en la hoja CONFIG, pero usted puede cambiar este valor por el que sea necesario para su modelo. El nœmero 45 preestablecido se ajusta en grados a una vuelta completa, pues 8 x 45 = 360, lo cual se utiliza frecuentemente para la rotaci—n de los ejes." Range("AF495").Value = "En esta celda se introduce el par‡metro para una simulaci—n din‡mica, el cual puede cambiar consecutivamente, como por ejemplo el par‡metro del tiempo, en este caso aqu’ se introduce la variable t, es decir esta celda debe tener el lugar de la variable t de una ecuaci—n matem‡tica din‡mica. Como ilustraci—n del funcionamiento de esta celda se puede ver el proyecto MOVIMIENTO PARABîLICO." Range("AE493").Value = "In this cell the step value is entered for a dynamic simulation, where a certain model parameter can change consecutively, such as the time parameter, in this case the unit of time is entered here, that is, 1. By default, the value from the CONFIG sheet is entered, but you can change this value to whatever is necessary for your model. The preset number 8 corresponds to 8 degrees, since 8 x 45 = 360, which is frequently used for the rotation of the axes." Range("AE494").Value = "In this cell you enter the number of steps for a dynamic simulation, where a certain model parameter can change consecutively, such as the time parameter, where the number of seconds of the simulation is entered in this cell, by default 45. By default the value from the CONFIG sheet is entered, but you can change this value to whatever is necessary for your model. The preset number 45 is set in degrees to one full revolution , since 8 x 45 = 360, which is frequently used for the rotation of the axes." Range("AE495").Value = "In this cell the parameter for a dynamic simulation is entered, which can change consecutively, such as the time parameter, in this case the variable t is entered here, that is, this cell must take the place of the variable t of a dynamic mathematical equation. As an illustration of the functioning of this cell, you can see the project PARABOLIC MOTION." 'valores predeterminados de layuda para la columna J Range("AF497").Value = "El bot—n ubicado en esta celda est‡ destinado a ocultar o mostrar las columnas de configuraci—n de los vectores y del modelo, es decir las primeras 5 columnas. " Range("AF498").Value = "Al oprimir este bot—n, la celda activa en la hoja actuar‡ como par‡metro din‡mico avanzando. Para ver su funcionamiento seleccione una celda que no estŽ ocupada y oprima este bot—n, observar‡ que la elda cambia su valor consecutivamente. Este bot—n es œtil para verificar r‡pidamente el comportamiento de variables de un modelo con diferentes valores, simplemente seleccionando la celda de la variable y oprimiendo este bot—n. " Range("AF499").Value = "Al oprimir este bot—n, la celda activa en la hoja actuar‡ como par‡metro din‡mico retrocediendo. Para ver su funcionamiento seleccione una celda que no estŽ ocupada y oprima este bot—n, observar‡ que la elda cambia su valor consecutivamente. Este bot—n es œtil para verificar r‡pidamente el comportamiento de variables de un modelo con diferentes valores, simplemente seleccionando la celda de la variable y oprimiendo este bot—n. " Range("AF500").Value = "<<-- poner el par‡metro din‡mico en cero. " & Chr(13) & "<- retroceder un paso." Range("AE497").Value = "The button located in this cell is intended to hide or show the vector and model configuration columns, that is, the first 5 columns." Range("AE498").Value = "When you press this button, the active cell in the spreadsheet will act as a dynamic forward parameter. To see how it works, select an empty cell and press this button, you will notice that the cell changes its value consecutively. This button is useful to quickly check the behavior of variables in a model with different values, simply by selecting the variable cell and pressing this button." Range("AE499").Value = "When you press this button, the active cell in the spreadsheet will act as a dynamic back parameter. To see how it works, select an empty cell and press this button, you will notice that the cell changes its value consecutively. This button is useful to quickly check the behavior of variables in a model with different values, simply by selecting the variable cell and pressing this button." Range("AE500").Value = "<<-- sets the dynamic parameter to zero. " & Chr(13) & "<- goes back one step." 'valores predeterminados de layuda para la columna K Range("AF502").Value = "Bot—n de ayuda. Seleccione cualquier celda en la hoja y oprima este bot—n para obtener ayuda sobre la celda seleccionada. " Range("AF503").Value = "Comentario de ayuda. Coloque el cursor sobre esta celda para obtener ayuda sobre el proyecto en curso. Para editar la informaci—n del comentario y personalizarla para su propio proyecto, oprima el bot—n derecho del rat—n y seleccione EDITAR COMENTARIO. La informaci—n nueva o editada solamente se guardar‡ despuŽs de oprimir el bot—n CîDIGO." Range("AF504").Value = "Versi—n actual del paquete ScienSolar." Range("AF505").Value = "Ejecutar una simulaci—n. Este bot—n s—lo funciona si la celda I5 est‡ ligada a una variable o par‡metro. Para ver su funci—n con m‡s detalle, abra una nueva hoja y descargue el proyecto MOVIMIENTO PARABîLICO, seleccione la celda B39 correspondiente a la componente en el eje y de la velocidad, observe que su f—rmula est‡ ligada con la celda I5 mediante la ecuaci—n v_y = v_oy + a_y t." Range("AE502").Value = "Help button. Select any cell on the sheet and press this button to get help on the selected cell." Range("AE503").Value = "Help comment. Place the cursor over this cell for help on the current project. To edit the comment information and customize it for your own project, right-click and select EDIT COMMENT. New or edited information will only be saved after pressing the CODE button." Range("AE504").Value = "Current version of the ScienSolar package." Range("AE505").Value = "Run a simulation. This button only works if cell I5 is linked to a variable or parameter. To see its function in more detail, open a new sheet and download the PARABOLIC MOTION project, select cell B39 corresponding to the y-axis component of velocity, note that its formula is linked to cell I5 by the equation v_y = v_oy + a_y t." 'valores predeterminados de layuda para la columna L Range("AF510").Value = " -->> poner el par‡metro din‡mico en su œltimo valor. " & Chr(13) & "adelantar un paso." Range("AE510").Value = " -->> set the dynamic parameter to its last value. " & Chr(13) & "advance one step." 'valores predeterminados de layuda para la columna O Range("AF522").Value = "Manuales y libros sobre los modelos de ScienSolar. Encuentre en este v’nculo los manuales y libros en espa–ol e inglŽs, y a futuro en otros idiomas, sobre c—mo sacar mejor provecho de este paquete para sus propios modelos de f’sica y matem‡ticas. Los libros se ofrecen en versiones de papel y versiones de lectura en l’nea. " Range("AE522").Value = "Manuals and books on the ScienSolar models. Find at this link the manuals and books in Spanish and English, and in the future in other languages, on how to get the most out of this package for your own models of physics and mathematics. The books are offered in print versions and online reading versions." 'valores predeterminados de layuda para la columna P Range("AF527").Value = "Manuales y libros sobre los modelos de ScienSolar. Encuentre en este v’nculo los manuales y libros en espa–ol e inglŽs, y a futuro en otros idiomas, sobre c—mo sacar mejor provecho de este paquete para sus propios modelos de f’sica y matem‡ticas. Los libros se ofrecen en versiones de papel y versiones de lectura en l’nea. " Range("AF530").Value = "Oprima este bot—n para abrir una nueva hoja de c‡lculo para un nuevo proyecto o para abrir otros proyectos ScienSolar. Cada hoja es totalmente independiente y pueden abrirse varias hojas simult‡neamente sin que esto afecte a los proyectos ya abiertos. " Range("AE527").Value = "Manuals and books on the ScienSolar models. Find at this link the manuals and books in Spanish and English, and in the future in other languages, on how to get the most out of this package for your own models of physics and mathematics. The books are offered in print versions and online reading versions." Range("AE530").Value = "Press this button to open a new spreadsheet for a new project or to open other ScienSolar projects. Each sheet is completely independent and multiple sheets can be opened simultaneously without affecting already open projects " 'valores predeterminados de layuda para la columna Q Range("AF535").Value = "Lista de proyectos. Para que un proyecto aparezca en esta lista se deben cumplir dos requisitos. 1. Que se encuentre listado en la hoja CONFIG. 2. Que su c—digo se encuentre en el editor VBA del libro de Excel, con su encabezado configurado correctamente. Cada proyecto puede tener diferentes versiones de acuerdo a su idioma, cada una de ellas con su propio c—digo y su encabezado distinguido por el acr—nimo del idioma (por ejemplo EN, ES, etc.)" Range("AE535").Value = "List of projects. For a project to appear in this list, two requirements must be met. 1. It must be listed on the CONFIG sheet. 2. Its code must be in the book's VBA editor of Excel, with its header configured correctly. Each project can have different versions depending on its language, each of them with its own code and its header distinguished by the language acronym (for example EN, ES, etc.)" 'valores predeterminados de layuda para la columna R Range("AF540").Value = "Lista de proyectos. Para que un proyecto aparezca en esta lista se deben cumplir dos requisitos. 1. Que se encuentre listado en la hoja CONFIG. 2. Que su c—digo se encuentre en el editor VBA del libro de Excel, con su encabezado configurado correctamente. Cada proyecto puede tener diferentes versiones de acuerdo a su idioma, cada una de ellas con su propio c—digo y su encabezado distinguido por el acr—nimo del idioma (por ejemplo EN, ES, etc.)" Range("AE540").Value = "List of projects. For a project to appear in this list, two requirements must be met. 1. It must be listed on the CONFIG sheet. 2. Its code must be in the book's VBA editor of Excel, with its header configured correctly. Each project can have different versions depending on its language, each of them with its own code and its header distinguished by the language acronym (for example EN, ES, etc.)" 'valores predeterminados de layuda para la columna S Range("AF542").Value = "La funci—n del bot—n Restablecer es eliminar todo el contenido actual de la hoja de c‡lculo y volver a la configuraci—n de una hoja nueva. Esta acci—n es irreversible pero s—lo afecta los cambios hechos despuŽs de haber abierto un proyecto. Los proyectos ya guardados en ScienSolar mediante el copiado de c—digo al editor de VBA no son afectados por la acci—n de este bot—n." Range("AF545").Value = "Lista de proyectos. Para que un proyecto aparezca en esta lista se deben cumplir dos requisitos. 1. Que se encuentre listado en la hoja CONFIG. 2. Que su c—digo se encuentre en el editor VBA del libro de Excel, con su encabezado configurado correctamente. Cada proyecto puede tener diferentes versiones de acuerdo a su idioma, cada una de ellas con su propio c—digo y su encabezado distinguido por el acr—nimo del idioma (por ejemplo EN, ES, etc.)" Range("AE542").Value = "The function of the Reset button is to delete all the current content of the spreadsheet and return to the settings of a new sheet. This action is irreversible but only affects changes made after having opened a project. Projects already saved in ScienSolar by copying the code to the VBA editor are not affected by the action of this button." Range("AE545").Value = "List of projects. For a project to appear in this list, two requirements must be met. 1. It must be listed on the CONFIG sheet. 2. Its code must be in the book's VBA editor of Excel, with its header configured correctly. Each project can have different versions depending on its language, each of them with its own code and its header distinguished by the language acronym (for example EN, ES, etc.)" 'valores predeterminados de layuda para la columna T Range("AF547").Value = "Idioma de la interface y del proyecto actual. Seleccione el idioma preferido y oprima Ejecutar. Para guardar un proyecto en un nuevo idioma, abra el proyecto en el idioma existente, ed’telo en el nuevo idioma y antes de exportarlo con el bot—n CîDIGO, seleccione el nuevo idioma de la lista desplegable. Luego de exportado, copie el c—digo del archivo exportado y pŽguelo en el editor de VBA. Para versiones de lenguaje del mismo proyecto, no necesita adicionarlo a la lista de proyectos en CONFIG, solamente agregar la traducci—n del t’tulo en la correspondiente columna. " Range("AF550").Value = "El bot—n vector tiene dos funciones: 1. Si la lista de proyectos no tiene seleccionado ningœn proyecto, este bot—n agregar‡ un nuevo vector. 2. Si la lista tiene seleccionado un proyecto, el proyecto seleccionado se cargar‡ a la hoja. Nota: existen proyectos grandes que necesitan cargarse por partes, as’ que tendr‡ que oprimirse varias veces eeste bot—n, estos proyectos grandes tienen m‡s de 20 vectores en su configuraci—n. Si ya existe un proyecto en la hoja de c‡lculo y se desea cargar otro proyecto, es necesario restablecer la hoja. No se pueden cargar dos proyectos a una misma hoja. " Range("AE547").Value = "Language of the interface and the current project. Select the preferred language and press Run. To save a project in a new language, open the project in the existing language, edit it in the new language and before exporting it with the CODE button, select the new language from the drop-down list. After exporting, copy the code from the exported file and paste it into the VBA editor. For language versions of the same project, you do not need to add it to the list of projects in CONFIG, just add the translation of the title in the corresponding column. " Range("AE550").Value = "The vector button has two functions: 1. If the project list has no project selected, this button will add a new vector. 2. If the list has a project selected, the selected project will be loaded to the sheet. Note: there are large projects that need to be loaded in parts, so you will have to press this button several times, these large projects have more than 20 vectors in their configuration. If a project already exists in the spreadsheet and If you want to load another project, you must reset the sheet. You cannot load two projects to the same sheet." 'Valores predeteminados del panel de control. Range("A2").FormulaR1C1 = "INICIO" Range("B1").FormulaR1C1 = "This sheet contains the default values; Be careful when making changes. Anyway, to reset all initial settings, delete this spreadsheet (CONFIG) and press the New Sheet button (from another sheet)." Range("B2").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[27]C[1])" Range("B3").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[8]C[1])" Range("B4").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[8]C[1])" Range("B5").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[8]C[1])" Range("B32").FormulaR1C1 = "(LISTA)" Range("B33").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B34").FormulaR1C1 = "- - - " Range("B35").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B36").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B37").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B38").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B39").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B40").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B41").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B42").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B43").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B44").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B45").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B46").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B47").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B48").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B49").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B50").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B51").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B52").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B53").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B54").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B55").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B56").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B57").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B58").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B59").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("B60").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" 'Range("B61").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" 'Range("B62").FormulaR1C1 = "=HLOOKUP(R2C17,R33C5:R150C11,RC[1])" Range("C2").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[12]C)" Range("C3").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[12]C)" Range("C10").FormulaR1C1 = "Verified translation" Range("C11").FormulaR1C1 = "3" Range("C12").FormulaR1C1 = "4" Range("C13").FormulaR1C1 = "5" Range("C14").FormulaR1C1 = "6" Range("C15").FormulaR1C1 = "7" Range("C16").FormulaR1C1 = "8" Range("C17").FormulaR1C1 = "9" Range("C18").FormulaR1C1 = "10" Range("C19").FormulaR1C1 = "11" Range("C20").FormulaR1C1 = "12" Range("C21").FormulaR1C1 = "13" Range("C22").FormulaR1C1 = "14" Range("C23").FormulaR1C1 = "15" Range("C24").FormulaR1C1 = "16" Range("C25").FormulaR1C1 = "17" Range("C26").FormulaR1C1 = "18" Range("C27").FormulaR1C1 = "19" Range("C28").FormulaR1C1 = "20" Range("C29").FormulaR1C1 = "21" Range("C32").FormulaR1C1 = "No, of list" Range("C33").FormulaR1C1 = "1" Range("C35").FormulaR1C1 = "3" Range("C36").FormulaR1C1 = "4" Range("C37").FormulaR1C1 = "5" Range("C38").FormulaR1C1 = "6" Range("C39").FormulaR1C1 = "7" Range("C40").FormulaR1C1 = "8" Range("C41").FormulaR1C1 = "9" Range("C42").FormulaR1C1 = "10" Range("C43").FormulaR1C1 = "11" Range("C44").FormulaR1C1 = "12" Range("C45").FormulaR1C1 = "13" Range("C46").FormulaR1C1 = "14" Range("C47").FormulaR1C1 = "15" Range("C48").FormulaR1C1 = "16" Range("C49").FormulaR1C1 = "17" Range("C50").FormulaR1C1 = "18" Range("C51").FormulaR1C1 = "19" Range("C52").FormulaR1C1 = "20" Range("C53").FormulaR1C1 = "21" Range("C54").FormulaR1C1 = "22" Range("C55").FormulaR1C1 = "23" Range("C56").FormulaR1C1 = "24" Range("C57").FormulaR1C1 = "25" Range("C58").FormulaR1C1 = "26" Range("C59").FormulaR1C1 = "27" Range("C60").FormulaR1C1 = "28" 'Range("C61").FormulaR1C1 = "29" 'Range("C62").FormulaR1C1 = "30" Range("D2").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[14]C[-1])" Range("D3").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[14]C[-1])" Range("D4").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[14]C[-1])" Range("D5").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[14]C[-1])" Range("D6").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[14]C[-1])" Range("D10").FormulaR1C1 = "Note: Please do not change the labels LISTA and INICIO, they are necessary for the correct running of the program." Range("D11").FormulaR1C1 = "Obs: por favor no cambie los nombres LISTA e INICIO, pues son necesarios para el correcto funcionamiento del programa." Range("D34").FormulaR1C1 = "Verified translation" Range("E3").FormulaR1C1 = "850" Range("E4").FormulaR1C1 = "400" Range("E5").FormulaR1C1 = "20" Range("E6").FormulaR1C1 = "200" Range("E8").FormulaR1C1 = "=R3C17" Range("E9").FormulaR1C1 = "1" Range("E10").FormulaR1C1 = "0" Range("E11").FormulaR1C1 = "Get code" Range("E12").FormulaR1C1 = " +Obj" Range("E13").FormulaR1C1 = " -Obj" Range("E14").FormulaR1C1 = " New sheet " Range("E15").FormulaR1C1 = " + Vector" Range("E16").FormulaR1C1 = "Origin" Range("E17").FormulaR1C1 = "Left:" Range("E18").FormulaR1C1 = "Up:" Range("E19").FormulaR1C1 = "Scale:" Range("E20").FormulaR1C1 = "Axes lenght:" Range("E21").FormulaR1C1 = "Rotation" Range("E22").FormulaR1C1 = "Dynamic parameters" Range("E23").FormulaR1C1 = "Step:" Range("E24").FormulaR1C1 = "No. steps:" Range("E25").FormulaR1C1 = "Parameter:" Range("E26").FormulaR1C1 = "Selected" Range("E27").FormulaR1C1 = "Set to zero" Range("E28").FormulaR1C1 = "1 by 1" Range("E29").FormulaR1C1 = "Reset" Range("E32").FormulaR1C1 = "=R3C17" Range("E33").FormulaR1C1 = "1" Range("E34").FormulaR1C1 = "0" Range("E35").FormulaR1C1 = "Vector Addition" Range("E36").FormulaR1C1 = "Vector Coordinates" Range("E37").FormulaR1C1 = "Cross Product" Range("E38").FormulaR1C1 = "Unit Vector" Range("E39").FormulaR1C1 = "Rotation of a Vector" Range("E40").FormulaR1C1 = "Composite Rotation" Range("E41").FormulaR1C1 = "Tangential Rotation" Range("E42").FormulaR1C1 = "Cylindrical Coordinates" Range("E43").FormulaR1C1 = "Spherical Coordinates" Range("E44").FormulaR1C1 = "Plane Symmetry" Range("E45").FormulaR1C1 = "Cylindrical Symmetry" Range("E46").FormulaR1C1 = "Spherical Symmetry" Range("E47").FormulaR1C1 = "TRAJECTORY" Range("E48").FormulaR1C1 = "Parabolic Movement" Range("E49").FormulaR1C1 = "3D Model" Range("E50").FormulaR1C1 = "Lens" Range("E51").FormulaR1C1 = "3D Pyramid" Range("E52").FormulaR1C1 = "PV = NkT" Range("E53").FormulaR1C1 = "Functions" Range("E54").FormulaR1C1 = "ScienSolar" Range("E55").FormulaR1C1 = "Battery" Range("E56").FormulaR1C1 = "Coulomb Force" Range("E57").FormulaR1C1 = "Electric Field" Range("E58").FormulaR1C1 = "Magnetic Force" Range("E59").FormulaR1C1 = "Loop in a Magnetic Field" Range("E60").FormulaR1C1 = "Biot-Savart Law" 'Range("E61").FormulaR1C1 = "RC Circuit" 'Range("E62").FormulaR1C1 = "Poynting Vector" Range("F2").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[19]C[-3])" Range("F4").FormulaR1C1 = "x" Range("F5").FormulaR1C1 = "y" Range("F6").FormulaR1C1 = "z" Range("F8").FormulaR1C1 = "=R4C17" Range("F9").FormulaR1C1 = "2" Range("F10").FormulaR1C1 = "1" Range("F11").FormulaR1C1 = "C" & ChrW(243) & "digo" Range("F12").FormulaR1C1 = " +Obj" Range("F13").FormulaR1C1 = " -Obj" Range("F14").FormulaR1C1 = "Nueva hoja" Range("F15").FormulaR1C1 = " + Vector" Range("F16").FormulaR1C1 = "Origen" Range("F17").FormulaR1C1 = "Izquierda:" Range("F18").FormulaR1C1 = "Arriba:" Range("F19").FormulaR1C1 = "Escala:" Range("F20").FormulaR1C1 = "Long. ejes " Range("F21").FormulaR1C1 = "Rotaci" & ChrW(243) & "n" Range("F22").FormulaR1C1 = "Par" & ChrW(225) & "metros din" & ChrW(225) & "micos" Range("F23").FormulaR1C1 = "Paso:" Range("F24").FormulaR1C1 = "N¡ de pasos:" Range("F25").FormulaR1C1 = "Par" & ChrW(225) & "metro:" Range("F26").FormulaR1C1 = " Seleccionado" Range("F27").FormulaR1C1 = "Reiniciar" Range("F28").FormulaR1C1 = " 1 por 1" Range("F29").FormulaR1C1 = "Restablecer" Range("F32").FormulaR1C1 = "=R4C17" Range("F33").FormulaR1C1 = "2" Range("F34").FormulaR1C1 = "1" Range("F35").FormulaR1C1 = "Suma de vectores" Range("F36").FormulaR1C1 = "Coordenadas de vectores" Range("F37").FormulaR1C1 = "Producto cruz" Range("F38").FormulaR1C1 = "Vector unitario" Range("F39").FormulaR1C1 = "Rotaci" & ChrW(243) & "n de un vector" Range("F40").FormulaR1C1 = "Rotaci" & ChrW(243) & "n compuesta" Range("F41").FormulaR1C1 = "Rotci" & ChrW(243) & "n tangencial" Range("F42").FormulaR1C1 = "Coordenadas cil" & ChrW(237) & "ndricas" Range("F43").FormulaR1C1 = "Coordenadas esf" & ChrW(233) & "ricas" Range("F44").FormulaR1C1 = "Simetr" & ChrW(237) & "a plana" Range("F45").FormulaR1C1 = "Simetr" & ChrW(237) & "a cil" & ChrW(237) & "ndrica" Range("F46").FormulaR1C1 = "Simetr" & ChrW(237) & "a esf" & ChrW(233) & "rica" Range("F47").FormulaR1C1 = "TRAJECTORY" Range("F48").FormulaR1C1 = "Movimiento parab" & ChrW(243) & "lico" Range("F49").FormulaR1C1 = "Modelo 3D" Range("F50").FormulaR1C1 = "Lente" Range("F51").FormulaR1C1 = "Pir" & ChrW(225) & "mide 3D" Range("F52").FormulaR1C1 = "PV = NkT" Range("F53").FormulaR1C1 = "Funciones" Range("F54").FormulaR1C1 = "ScienSolar" Range("F55").FormulaR1C1 = "Bateria" Range("F56").FormulaR1C1 = "Fuerza de Coulomb" Range("F57").FormulaR1C1 = "Campo el" & ChrW(233) & "ctrico" Range("F58").FormulaR1C1 = "Fuerza magn" & ChrW(233) & "tica" Range("F59").FormulaR1C1 = "Espira en un campo magn" & ChrW(233) & "tico" Range("F60").FormulaR1C1 = "Ley de Biot - Savart" 'Range("F61").FormulaR1C1 = "Circuito RC" 'Range("F62").FormulaR1C1 = "Vector de Poynting" Range("G4").FormulaR1C1 = "0" Range("G5").FormulaR1C1 = "15" Range("G6").FormulaR1C1 = "15" Range("G8").FormulaR1C1 = "=R5C17" Range("G9").FormulaR1C1 = "3" Range("G10").FormulaR1C1 = "0" Range("G29").FormulaR1C1 = "Reset" Range("G32").FormulaR1C1 = "=R5C17" Range("G33").FormulaR1C1 = "3" Range("G34").FormulaR1C1 = "0" Range("H2").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[20]C[-5])" Range("H3").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[20]C[-5])" Range("H4").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[20]C[-5])" Range("H5").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[20]C[-5])" Range("H8").FormulaR1C1 = "=R6C17" Range("H9").FormulaR1C1 = "4" Range("H10").FormulaR1C1 = "0" Range("H29").FormulaR1C1 = "Reset" Range("H32").FormulaR1C1 = "=R6C17" Range("H33").FormulaR1C1 = "4" Range("H34").FormulaR1C1 = "0" Range("I3").FormulaR1C1 = "8" Range("I4").FormulaR1C1 = "45" Range("I5").FormulaR1C1 = "0" Range("I8").FormulaR1C1 = "=R7C17" Range("I9").FormulaR1C1 = "5" Range("I10").FormulaR1C1 = "0" Range("I29").FormulaR1C1 = "Reset" Range("I32").FormulaR1C1 = "=R7C17" Range("I33").FormulaR1C1 = "5" Range("I34").FormulaR1C1 = "0" Range("J3").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[23]C[-7])" Range("J4").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[23]C[-7])" Range("J5").FormulaR1C1 = "=HLOOKUP(R2C17,R9C5:R31C12,R[23]C[-7])" Range("J8").FormulaR1C1 = "=R8C17" Range("J9").FormulaR1C1 = "6" Range("J10").FormulaR1C1 = "0" Range("J29").FormulaR1C1 = "Reset" Range("J32").FormulaR1C1 = "=R8C17" Range("J33").FormulaR1C1 = "6" Range("J34").FormulaR1C1 = "0" Range("K8").FormulaR1C1 = "=R9C17" Range("K9").FormulaR1C1 = "7" Range("K10").FormulaR1C1 = "0" Range("K29").FormulaR1C1 = "Reset" Range("K32").FormulaR1C1 = "=R9C17" Range("K33").FormulaR1C1 = "7" Range("K34").FormulaR1C1 = "0" Range("N15").FormulaR1C1 = "Note: Please do not change the labels LISTA and INICIO, they are necessary for the correct running of the program." Range("N16").FormulaR1C1 = "Obs: por favor no cambie los nombres LISTA e INICIO, pues son necesarios para el correcto funcionamiento del programa." Range("N18").FormulaR1C1 = "FIRST USE INSTRUCTIONS:" Range("N20").FormulaR1C1 = "1. Press button New Sheet and, in the new sheet select a project from the drop-down list." Range("N21").FormulaR1C1 = "2. Press the + Vector button." Range("N22").FormulaR1C1 = "3. Customize the model." Range("N23").FormulaR1C1 = "4. View the model via the rotate buttons or run it via the Run button." Range("N24").FormulaR1C1 = "5. To select a new project, first press Reset." Range("N25").FormulaR1C1 = "6. To add new vectors, select blank from the drop-down list and press the +Vector button." Range("N28").FormulaR1C1 = "INSTRUCCIONES DE INICIO:" Range("N30").FormulaR1C1 = "1. Presione el bot" & ChrW(243) & "n New Sheet y luego en la nueva hoja seleccione un proyecto de la lista desplegable." Range("N31").FormulaR1C1 = "2. Presione el bot" & ChrW(243) & "n +Vector." Range("N32").FormulaR1C1 = "3. Personalice el modelo." Range("N33").FormulaR1C1 = "4. Con los botones de rotaci" & ChrW(243) & "n visualice y con el bot" & ChrW(243) & "n Run ejecute el modelo." Range("N34").FormulaR1C1 = "5. Para seleccionar un nuevo proyecto, primero oprima el bot" & ChrW(243) & "n Reset" Range("N35").FormulaR1C1 = "6. Para agregar nuevos vectores, no seleccione ning" & ChrW(250) & "n proyecto y oprima +Vector." Range("P2").FormulaR1C1 = "SELECTED:" Range("P3").FormulaR1C1 = "1" Range("P4").FormulaR1C1 = "2" Range("P5").FormulaR1C1 = "3" Range("P6").FormulaR1C1 = "4" Range("P7").FormulaR1C1 = "5" Range("P8").FormulaR1C1 = "6" Range("P9").FormulaR1C1 = "7" Range("Q1").FormulaR1C1 = "(LENGUAJE)" Range("Q2").FormulaR1C1 = "1" Range("Q3").FormulaR1C1 = "English" Range("Q4").FormulaR1C1 = "Spanish" Range("Q5").FormulaR1C1 = "Russian" Range("Q6").FormulaR1C1 = "Chinese" Range("Q7").FormulaR1C1 = "Italian" Range("Q8").FormulaR1C1 = "French" Range("Q9").FormulaR1C1 = "A" Range("R3").FormulaR1C1 = "EN" Range("R4").FormulaR1C1 = "ES" Range("R5").FormulaR1C1 = "RU" Range("R6").FormulaR1C1 = "ZH" Range("R7").FormulaR1C1 = "IT" Range("R8").FormulaR1C1 = "FR" Range("R9").FormulaR1C1 = "A" 'Termina valores predeterminados Range("C2:I6").Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With Range("D10").FormulaR1C1 = _ "Note: Please do not change the labels LISTA and INICIO, they are necessary for the correct running of the program." Range("D11").FormulaR1C1 = _ "Obs: por favor no cambie los nombres LISTA e INICIO, pues son necesarios para el correcto funcionamiento del programa." Range("D12").Select ActiveSheet.Buttons.Add(432, 109.5, 96, 21.75).Select Selection.OnAction = "NewSheet" Selection.Characters.Text = "New Sheet" Range("E17").Select salida: Sheets.Add Range("A2").Value = "INICIO" Init ActiveWindow.Zoom = 90 Application.ScreenUpdating = True MsgBox ActiveSheet.name & " has been added. " Set sheet = Nothing End Sub Sub CleanSheet() Dim result As String result = MsgBox("This action will remove all data and vectors from the current sheet, leaving only the coordinate system at its default settings. Do you wish to continue?", vbYesNo, "All data will be removed!") If result = "6" Then Init Else End If End Sub Sub About() MsgBox "Version 1.5 - 06-2024 " & Chr(13) & Chr(10) & "© Ariel R. Becerra B., 2022" _ & Chr(13) & "www.sciensolar.com" & Chr(13) _ & "arik@fisica.ru" _ & Chr(13) & Chr(13) & "By downloading the package you agree to the terms and conditions under the license" _ & " GNU General Public License v.3.0 (https://www.gnu.org/licenses/gpl-3.0.html)." _ & " You may use the ScienSolar package only under the terms of this license." _ & " To download the user manual, updates, physics problem models and other books on ScienSolar visit www.sciensolar.com." _ & Chr(13) & Chr(13) & "Al descargar el paquete, usted acepta los tŽrminos y condiciones de la licencia" _ & " GNU General Public License v.3.0 (https://www.gnu.org/licenses/gpl-3.0.html). " _ & "Puede utilizar el paquete ScienSolar s—lo bajo los tŽrminos de esta licencia." _ & " Para descargar el manual del usuario, actualizaciones, modelos de problemas y otros libros sobre ScienSolar visite www.sciensolar.com." _ & Chr(13) & Chr(13) & " Microsoft Excel version " _ & Application.Version & " running on " _ & Chr(13) & Application.OperatingSystem & "." _ , vbOKOnly, "ScienSolar " End Sub Sub HELP() ' 03.2024 Dim TxtMsg As String Dim TxtMsg2 As String Dim BoxLeft As Single If WorksheetFunction.And(ActiveCell.Top > 180, ActiveCell.Left > 400, ActiveCell.Left < 700) Then BoxLeft = 800 Else BoxLeft = 470 End If Dim sh As Object CheckExists ("campoHelp") If CheckExists("campoHelp") = True Then ActiveSheet.Shapes("campoHelp").Delete End If If WorksheetFunction.And(ActiveCell.Row > 41, ActiveCell.Column > 3, ActiveCell.Column < 6) Then TxtMsg = WorksheetFunction.VLookup("ZONE1", Sheets("CONFIG").Range("AA:AE"), 2, False) Else If WorksheetFunction.And(ActiveCell.Row > 41, ActiveCell.Column > 5, ActiveCell.Column < 8) Then TxtMsg = WorksheetFunction.VLookup("ZONE2", Sheets("CONFIG").Range("AA:AE"), 2, False) Else If WorksheetFunction.And(ActiveCell.Row > 5, ActiveCell.Column > 7, ActiveCell.Column < 22) Then TxtMsg = WorksheetFunction.VLookup("ZONE3", Sheets("CONFIG").Range("AA:AE"), 2, False) Else If WorksheetFunction.And(ActiveCell.Column > 21, ActiveCell.Column < 31) Then TxtMsg = WorksheetFunction.VLookup("ZONE4", Sheets("CONFIG").Range("AA:AE"), 2, False) Else If ActiveCell.Column > 30 Then TxtMsg = WorksheetFunction.VLookup("ZONE5", Sheets("CONFIG").Range("AA:AE"), 2, False) Else If WorksheetFunction.VLookup(ActiveCell.Address(0, 0), Sheets("CONFIG").Range("AA:AE"), 3, False) <> "" Then If WorksheetFunction.VLookup(ActiveCell.Address(0, 0), Sheets("CONFIG").Range("AA:AE"), 3, False) = ActiveSheet.Range("A4").Value Then TxtMsg = WorksheetFunction.VLookup(ActiveCell.Address(0, 0), Sheets("CONFIG").Range("AA:AE"), 2, False) Else TxtMsg = " [Project " & WorksheetFunction.VLookup(ActiveCell.Address(0, 0), Sheets("CONFIG").Range("AA:AE"), 3, False) & "]" End If Else TxtMsg = WorksheetFunction.VLookup(ActiveCell.Address(0, 0), Sheets("CONFIG").Range("AA:AE"), 2, False) End If End If End If End If End If End If If ActiveCell.Value <> "" Then If Left(ActiveCell.Formula, 1) <> "=" Then TxtMsg2 = "=" & ActiveCell.Value Else TxtMsg2 = ActiveCell.Formula ' & Chr(13) & ActiveCell.FormulaR1C1 & Chr(13) & "Cell(" & ActiveCell.Row & "," & ActiveCell.Column & ")" '& ActiveCell.FormulaR1C1 ' Activar para ver la formula en r1c1 End If Else TxtMsg2 = "" End If Set sh = ActiveSheet.Shapes.AddShape(114, BoxLeft, 200, 250, 800) 'otras formas sh.name = "campoHelp" With ActiveSheet.Shapes.Range(Array("campoHelp")) ' apariencia del vector .Line.BeginArrowheadStyle = 1 .Line.EndArrowheadStyle = 6 .Line.ForeColor.ObjectThemeColor = msoThemeColorAccent1 .Line.DashStyle = 1 .Line.Weight = 2 .TextFrame2.TextRange.Characters.Text = ActiveCell.Address(0, 0) & TxtMsg2 & Chr(13) & Chr(13) & TxtMsg _ & Chr(13) & " _________________________ " & Chr(13) & Sheets("CONFIG").Range("AB1").Value .Fill.ForeColor.RGB = RGB(255, 255, 0) .TextFrame2.TextRange.Font.Size = 14 .TextFrame2.TextRange.Font.Fill.ForeColor.ObjectThemeColor = msoThemeColorText1 .TextFrame2.WordWrap = msoTrue .TextFrame2.AutoSize = msoAutoSizeShapeToFitText .Fill.Transparency = 0.2 .Adjustments.Item(4) = (ActiveCell.Left - .Left + 30) / .Width ' posiscion de la flecha, si aplica .Adjustments.Item(3) = (ActiveCell.Top - .Top + 7) / .Height 'posiscion de la flecha, si aplica End With Set sh = Nothing End Sub Function CheckExists(argName As String) As Boolean ' Verifica presencia de objetos en la hoja Dim Obj As Object CheckExists = False On Error Resume Next For Each Obj In ActiveSheet.Shapes If UCase(Obj.name) = UCase(argName) Then CheckExists = True: Exit Function Next Obj End Function Sub DeleteObjects(shType As Single) ' Limpiar hoja 'Tipos: objeto 3D:30 , formulas: 17. Dim sh As Object On Error Resume Next For Each sh In ActiveSheet.Shapes If sh.Type = shType Then sh.Delete End If Next sh Set sh = Nothing End Sub Sub rotate_XZY() '© 2022 A Becerra. ScienSolar.com Dim fila As Range Dim m As Integer Dim n As Integer Set fila = Cells.Find(What:="INICIO") m = fila.Offset(1, 0).Row n = fila.Offset(1, 1).Column Set fila = Nothing ActiveSheet.Cells(m + 1, n + 5) = 0 ActiveSheet.Cells(m + 2, n + 5) = 15 ActiveSheet.Cells(m + 3, n + 5) = 15 Rotate DoEvents End Sub Sub rotate_YZ() '© 2022 A Becerra. ScienSolar.com Dim fila As Range Dim m As Integer Dim n As Integer Set fila = Cells.Find(What:="INICIO") m = fila.Offset(1, 0).Row n = fila.Offset(1, 1).Column Set fila = Nothing ActiveSheet.Cells(m + 1, n + 5) = 0 ActiveSheet.Cells(m + 2, n + 5) = 0 ActiveSheet.Cells(m + 3, n + 5) = 0 Rotate DoEvents End Sub Sub rotate_XZ() '© 2022 A Becerra. ScienSolar.com Dim fila As Range Dim m As Integer Dim n As Integer Set fila = Cells.Find(What:="INICIO") m = fila.Offset(1, 0).Row n = fila.Offset(1, 1).Column Set fila = Nothing ActiveSheet.Cells(m + 1, n + 5) = 0 ActiveSheet.Cells(m + 2, n + 5) = 0 ActiveSheet.Cells(m + 3, n + 5) = 90 DoEvents Rotate End Sub Sub rotate_XY() '© 2022 A Becerra. ScienSolar.com Dim fila As Range Dim m As Integer Dim n As Integer Set fila = Cells.Find(What:="INICIO") m = fila.Offset(1, 0).Row n = fila.Offset(1, 1).Column Set fila = Nothing ActiveSheet.Cells(m + 1, n + 5) = 0 ActiveSheet.Cells(m + 2, n + 5) = 90 ActiveSheet.Cells(m + 3, n + 5) = 0 Rotate DoEvents End Sub Sub rotate_A() '© 2022 A Becerra. ScienSolar.com Application.Cursor = xlNorthwestArrow Dim fila As Range Dim m As Integer Dim n As Integer Dim i As Integer Set fila = Cells.Find(What:="INICIO") m = fila.Offset(1, 0).Row n = fila.Offset(1, 1).Column Set fila = Nothing i = 0 For i = 1 To ActiveSheet.Cells(m + 1, n + 7) Application.ScreenUpdating = True ActiveSheet.Cells(m + 1, n + 5).Value = Cells(m + 1, n + 5).Value + Cells(m, n + 7).Value Rotate DoEvents Next i Application.Cursor = xlDefault End Sub Sub rotate_B() '© 2022 A Becerra. ScienSolar.com Application.Cursor = xlNorthwestArrow Dim fila As Range Dim m As Integer Dim n As Integer Dim i As Integer Set fila = Cells.Find(What:="INICIO") m = fila.Offset(1, 0).Row n = fila.Offset(1, 1).Column Set fila = Nothing i = 0 For i = 1 To ActiveSheet.Cells(m + 1, n + 7) Application.ScreenUpdating = True ActiveSheet.Cells(m + 2, n + 5).Value = Cells(m + 2, n + 5).Value + Cells(m, n + 7).Value Rotate DoEvents Next i Application.Cursor = xlDefault End Sub Sub rotate_C() '© 2022 A Becerra. ScienSolar.com ' Dim t As Single ' para medir el tiempo 1/100 s quitar el comentario ' t = Timer Application.Cursor = xlNorthwestArrow Dim fila As Range Dim m As Integer Dim n As Integer Dim i As Integer Dim Now Set fila = Cells.Find(What:="INICIO") m = fila.Offset(1, 0).Row n = fila.Offset(1, 1).Column Set fila = Nothing i = 0 For i = 1 To ActiveSheet.Cells(m + 1, n + 7) 'Application.ScreenUpdating = True ActiveSheet.Cells(m + 3, n + 5).Value = Cells(m + 3, n + 5).Value + Cells(m, n + 7).Value Rotate DoEvents Next i Application.Cursor = xlDefault ' MsgBox (Timer - t) & " s." ' muestra el tiempo que dura el codigo en ejecutarse. Quitar el comentario End Sub Sub rotate_n() '© 2022 A Becerra. ScienSolar.com Application.Cursor = xlNorthwestArrow Dim fila As Range Dim m As Integer Dim n As Integer Set fila = Cells.Find(What:="INICIO") m = fila.Offset(1, 0).Row n = fila.Offset(1, 1).Column Set fila = Nothing i = 0 For i = 1 To ActiveSheet.Cells(m + 1, n + 7).Value On Error GoTo salida ' detiene el ciclo al interrumpirlo con el raton ActiveSheet.Cells(m + 2, n + 7).Value = Cells(m + 2, n + 7).Value + Cells(m, n + 7).Value Rotate DoEvents Next i salida: Application.Cursor = xlDefault End Sub Sub rotate_Single() '© 2022 A Becerra. ScienSolar.com Application.Cursor = xlNorthwestArrow Dim fila As Range Dim m As Integer Dim n As Integer Set fila = Cells.Find(What:="INICIO") m = fila.Offset(1, 0).Row n = fila.Offset(1, 1).Column Set fila = Nothing Cells(m + 2, n + 7).Value = Cells(m + 2, n + 7).Value + Cells(m, n + 7).Value Rotate Application.Cursor = xlDefault End Sub Sub rotate_SingleBack() '© 2022 A Becerra. ScienSolar.com Application.Cursor = xlNorthwestArrow Dim fila As Range Dim m As Integer Dim n As Integer Set fila = Cells.Find(What:="INICIO") m = fila.Offset(1, 0).Row n = fila.Offset(1, 1).Column Set fila = Nothing Cells(m + 2, n + 7).Value = Cells(m + 2, n + 7).Value - Cells(m, n + 7).Value Rotate Application.Cursor = xlDefault End Sub Sub ChangeParameter() '© 2022 A Becerra. ScienSolar.com Application.Cursor = xlNorthwestArrow Dim fila As Range Dim m As Integer Dim n As Integer Dim PASO As Single Dim i_f As Integer Set fila = Cells.Find(What:="INICIO") m = fila.Offset(1, 0).Row n = fila.Offset(1, 1).Column Set fila = Nothing If Application.Caller = "ChangeParBack" Then PASO = -Cells(m, n + 7).Value Else PASO = Cells(m, n + 7).Value End If If PASO = 0.25 Then MsgBox "The value 0,25 is special and makes that the two adjacent cells to the left also change their value." End If i_f = Cells(m + 1, n + 7).Value For i = 1 To i_f Application.ScreenUpdating = True ActiveCell.Value = ActiveCell.Value + PASO If PASO = 0.25 Then ActiveCell.Offset(0, -1).Value = ActiveCell.Offset(0, -1).Value + PASO ActiveCell.Offset(0, -2).Value = ActiveCell.Offset(0, -2).Value + PASO End If Rotate DoEvents Next i Application.Cursor = xlDefault End Sub Sub DeleteData() Sheets("CONFIG").Columns("U:V").ClearContents End Sub Sub DeleteGraphFunction() ' restablece los par_metros iniciales para graficar Dim steps Dim m1 As Integer Dim n1 As Integer steps = ActiveSheet.Buttons(Application.Caller).TopLeftCell.Offset(-1, 0).Address DeleteData Sheets("CONFIG").Range("T5").Value = ActiveSheet.Range(steps) ActiveSheet.Range(steps).Offset(2, 1).Value = 1 ' borra las gr_ficas ya dibujadas - historia = 1 ActiveSheet.Range(steps).Offset(1, 1).Value = "" ActiveSheet.Range(steps).Offset(1, 0).Value = "" ActiveSheet.Range(steps).Offset(1, -1).Value = "" ActiveSheet.DropDowns("List2").Select With Selection ' actualizar la lista para incluir los vectores posteriores Do While .ListCount > 0 ' incluye los vectores depu_s del actual .ListIndex = .ListCount .RemoveItem (.ListIndex) Loop i = 3 m1 = 3 n1 = 2 Do While Cells(m1 + i, n1 - 1) <> "" ' incluye todos los vectores anteriores al m‹dulo de gršfico .AddItem Cells(m1 + i, n1 - 1).Value i = i + 9 Loop Sheets("CONFIG").Range("V6").Value = "" Cells(m1 + 9, n1 + 4).Select End With End Sub Sub ShowHideVecConf() Application.ScreenUpdating = False Dim r As Range Dim last As Single Set r = ActiveSheet.Buttons(Application.Caller).TopLeftCell If Cells(r.Row, r.Column).Value = 1 And Cells(r.Row - 1, r.Column).Value <> "" Then last = Cells(r.Row - 1, r.Column).Value Else last = 1 End If i = 1 Do While i < last * 9 If Range(Cells(r.Row + i, r.Column), Cells(r.Row + i, r.Column)).Value = 1 Then Range(Cells(r.Row + i, r.Column), Cells(r.Row + i + 7, r.Column)).EntireRow.Hidden = True ActiveSheet.Buttons(Application.Caller).Caption = ChrW(9779) Range(Cells(r.Row + i, r.Column), Cells(r.Row + i, r.Column)).Value = 0 Else Range(Cells(r.Row + i, r.Column), Cells(r.Row + i + 7, r.Column)).EntireRow.Hidden = False ActiveSheet.Buttons(Application.Caller).Caption = ChrW(9650) Range(Cells(r.Row + i, r.Column), Cells(r.Row + i, r.Column)).Value = 1 End If i = i + 9 Loop Rotate Set r = Nothing Application.ScreenUpdating = True End Sub Sub ShowHideMenu() Application.ScreenUpdating = False Dim r As Range Set r = ActiveSheet.Buttons(Application.Caller).TopLeftCell If Range(Cells(r.Row, r.Column), Cells(r.Row, r.Column)).Value = 1 Then Range(Cells(r.Row, r.Column - 9), Cells(r.Row, r.Column - 5)).EntireColumn.Hidden = True ActiveSheet.Buttons(Application.Caller).Caption = ChrW(9654) Range(Cells(r.Row, r.Column), Cells(r.Row, r.Column)).Value = 0 Cells(3, 5).Value = Cells(3, 5).Value - 325 Else Range(Cells(r.Row, r.Column - 9), Cells(r.Row, r.Column - 5)).EntireColumn.Hidden = False ActiveSheet.Buttons(Application.Caller).Caption = ChrW(9664) Range(Cells(r.Row, r.Column), Cells(r.Row, r.Column)).Value = 1 Cells(3, 5).Value = Cells(3, 5).Value + 325 End If Rotate Set r = Nothing Application.ScreenUpdating = True End Sub Sub VectorForm() Dim r As Range Set r = ActiveSheet.Buttons(Application.Caller).TopLeftCell If Cells(r.Row + 8, r.Column + 2).Value = 1 Then Cells(r.Row + 8, r.Column + 2).Value = 2 Cells(r.Row + 7, r.Column + 2).Value = 2 Cells(r.Row, r.Column).Select With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorDark1 .TintAndShade = -0.249977111117893 .PatternTintAndShade = 0 End With Else If Cells(r.Row + 8, r.Column + 2).Value = 2 Then Cells(r.Row + 8, r.Column + 2).Value = 1 Cells(r.Row + 7, r.Column + 2).Value = 1 Cells(r.Row + 2, r.Column).Value = 10000 Cells(r.Row, r.Column).Select With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorAccent6 .TintAndShade = 0.799981688894314 .PatternTintAndShade = 0 End With End If End If Set r = Nothing Rotate Rotate End Sub Sub Reset() '© 2022 A Becerra. ScienSolar.com Dim fila As Range Dim m As Integer Dim n As Integer Dim PASO As Single Dim i_f As Integer Set fila = Cells.Find(What:="INICIO") m = fila.Offset(1, 0).Row n = fila.Offset(1, 1).Column Set fila = Nothing ActiveSheet.Cells(m + 2, n + 7).Value = Sheets("CONFIG").Cells(5, 9) ' v 1_2 Rotate End Sub Sub rotate_End() '© 2022 A Becerra. ScienSolar.com Dim fila As Range Dim m As Integer Dim n As Integer Dim PASO As Single Dim i_f As Integer Set fila = Cells.Find(What:="INICIO") m = fila.Offset(1, 0).Row n = fila.Offset(1, 1).Column Set fila = Nothing ActiveSheet.Cells(m + 2, n + 7).Value = ActiveSheet.Cells(m, n + 7).Value * ActiveSheet.Cells(m + 1, n + 7).Value Rotate End Sub Sub CreateCode() ' Generar cÜdigo para nuevos proyectos. '© 2022 A Becerra. ScienSolar.com 'Segment CreateCode-01. Definicion de variables Dim fila As Range Dim m As Integer Dim n As Integer Dim m1 As Integer Dim n1 As Integer Dim f As Integer Dim k As Integer Dim max As Integer ' Nov 2023 Dim subProj As Integer ' Nov 2023. para el nombre de los subproyectos. Dim flag As Boolean Dim FileName As Variant Dim Author As Variant Dim FileName1 As Variant ' nov 2023 Dim CellValue As String ' contenido del la celda, puede ser constantes o formulas Dim Flename As String Dim filepath As Variant Dim oFile Dim TxtLine As String Dim lista As Range max = 1 subProj = 0 flag = False Set fila = ActiveSheet.Cells.Find(What:="INICIO") m = fila.Offset(1, 0).Row n = fila.Offset(1, 1).Column If Cells(m, n + 8).Value = "" Then Author = InputBox("Please, enter the name of the author of this model:", "Author name", "Your name" & Hour(Now) & Minute(Now)) & " (" & Date & ")" Cells(m, n + 8).Value = Author Else Author = Cells(m, n + 8).Value End If m1 = m n1 = n f = m + 3 Set fila = Nothing 'Segment CreateCode-02a. Definir lenguaje. Created in 03.2024 Set lista = Sheets("CONFIG").Cells.Find(What:="(LENGUAJE)") m2 = lista.Row n2 = lista.Offset(0, -1).Column Lang = "_" & WorksheetFunction.VLookup(ActiveSheet.Cells(m - 1, n + 18).Value, Sheets("CONFIG").Range(Cells(m2, n2).Address(0, 0) & ":" & Cells(m2 + 14, n2 + 2).Address(0, 0)), 3, False) Set lista = Sheets("CONFIG").Cells.Find(What:="(LISTA)") m2 = lista.Row n2 = lista.Column Set lista = Nothing If ActiveSheet.Cells(m + 1, n - 1).Value <> "" Then FileName = WorksheetFunction.VLookup(ActiveSheet.Cells(m + 1, n - 1).Value, Sheets("CONFIG").Range(Cells(m2 + 1, n2 + 1).Address(0, 0) & ":" & Cells(m2 + 70, n2 + 9).Address(0, 0)), Cells(m - 1, n + 18).Value + 2, False) Else FileName = "NewProyect" & Hour(Now) & Minute(Now) End If FileName = InputBox("The project code will be generated in a text file in language " & Lang & ". Please, enter the file name", "File name", Cells(m + 1, n - 1).Value & "_" & FileName & Lang) FileName1 = FileName If FileName = Empty Then On Error Resume Next GoTo salida End If 'Segment CreateCode-02. Registrar el ultimo vector y la ultima fila ocupada k = 0 ' Do While Cells(f, n - 1).Value <> "" k = k + 1 f = f + 9 Loop 'Segment CreateCode-03. Creacion de un archivo de texto en Mac y en PC If Application.OperatingSystem Like "*Mac*" Then 'MAC split: 'Segment CreateCode-04. Preparar el nombre del archivo y del procedimiento If Cells(m1 + 1, n1 - 1).Value > 1 Then ' si se esta editando un proyecto se genera el codigo de la lista activo. i = Cells(m1 + 1, n1 - 1).Value ' valor de la celda vinculada a la lista Else ' si es un proyecto nuevo se genera el ñltimo nñmero de la lista + 1 i = 0 Do While Sheets("CONFIG").Cells(m2 + i, n2) <> "" i = i + 1 Loop End If If k > 23 Then FileName = FileName1 & "_" & subProj + 1 max = 1 Else FileName = FileName1 End If filepath = ThisWorkbook.Path & "/" & FileName & ".txt" oFile = FreeFile On Error GoTo salida Open filepath For Output As #oFile 'Segment CreateCode-05. Generar Sub y encabezado de instrucciones. If k > 23 Then Print #oFile, "Sub Project_" & i & "_" & subProj + 1 & Lang & "(ByVal VecType, m, n, m1, n1 As Integer) ' " & FileName Else Print #oFile, "Sub Project_" & i & Lang & "(ByVal VecType, m, n, m1, n1 As Integer) ' " & FileName End If Print #oFile, "" Print #oFile, " ' Updated: " & Date Print #oFile, " ' Created by: " & Author Print #oFile, " ' Modified by: _________________" Print #oFile, " ' This is the code of your new project. " Print #oFile, " ' Steps to embed the code to ScienSolar: " Print #oFile, " ' Note 1: The number " & i & " in the name of this function must match the one in the list of the CONFIG sheet for this project. If not, please correct it." Print #oFile, " ' Note 2: This code will be integrated into the main code (into the VBA editor) to automate the download of the project. " Print #oFile, " ' Note 3: The formulas and cell values generated here correspond only to the first 30 columns in the sheet. All your formulas and values are recommended to be written in these columns. " Print #oFile, " ' Step 1. Go to the CONFIG sheet (at the end of column C) and add the number of your new project to the last row in the projects list, and a short name in the corresponding langage column. " Print #oFile, " ' Step 2. Make sure that the list of projects in CONFIG sheet has the correct ascending numbering. " Print #oFile, " ' Step 4. Open the VBA editor (Alt + F11 in Windows or Fn + Option + F11 in macOS). To avoid mistakes, make sure you only have one workbook open." Print #oFile, " ' Step 5. On the left, in the project explorer, select a non full module (or add a new one)." Print #oFile, " ' Step 6. Select all the code in this file, copy and paste it at the end of the existing code in the module (or in the new one)." Print #oFile, " ' Step 7. To load the project and to check it in a new sheet, go to the CONFIG sheet and click the New Sheet button, then select the project from the list and click the +Vector button. " Print #oFile, " ' Step 8. Click any XYZ button to get the project in the coordinate system. Enjoy it! " Print #oFile, " ' Visit www.sciensolar.com for news and updates of © ScienSolar." Print #oFile, " " Print #oFile, " " 'Segment CreateCode-06. Registrar valores del tablero de control (solo para el primer archivo, en caso de varios) If m < 9 Then Print #oFile, " Cells(m1 -1, n1 + 2).FormulaR1C1 =" & """" & Cells(m - 1, n + 2).FormulaR1C1 + 1 & """" 'grabar el fondo de la hoja For i = 0 To 3 ' numero de filas del tablero. Modificado Feb 2024. V.1.41 For j = 0 To 8 ' numero de columnas del tablero If Cells(m1 + i, n1 + j).FormulaR1C1 <> "" Then ' lee todas las celdas y escribe su formula CellValue = Replace(Cells(m1 + i, n1 + j).FormulaR1C1, """", """""") 'reemplaza una comilla por dos comillas para que el codigo generado quede sin errores. Print #oFile, " Cells(m1 + " & i & ", n1 + " & j & ").FormulaR1C1 =" & """" & CellValue & """" End If Next j Next i Print #oFile, " Cells(m1, n1 + 9).FormulaR1C1 = " & """" & Cells(m, n + 9).FormulaR1C1 & """" ' insertar comentario HELP - Updated 05-2023 If Not Cells(m, n + 9).Comment Is Nothing Then Dim Comm As String Comm = Cells(m, n + 9).Comment.Text Comm = Replace(Comm, " ", "", 1) Comm = Replace(Comm, "‡", """ & ChrW(225) & """, 1) ' reemplazala a tilde por su caracter especial Comm = Replace(Comm, "Ž", """ & ChrW(233) & """, 1) ' reemplazala e tilde por su caracter especial Comm = Replace(Comm, "’", """ & ChrW(237) & """, 1) ' reemplazala i tilde por su caracter especial Comm = Replace(Comm, "—", """ & ChrW(243) & """, 1) ' reemplazala o tilde por su caracter especial Comm = Replace(Comm, "œ", """ & ChrW(250) & """, 1) ' reemplazala u tilde por su caracter especial Comm = Replace(Comm, "ç", """ & ChrW(193) & """, 1) ' reemplazala A tilde por su caracter especiall Comm = Replace(Comm, "ƒ", """ & ChrW(201) & """, 1) ' reemplazala E tilde por su caracter especial Comm = Replace(Comm, "ê", """ & ChrW(205) & """, 1) ' reemplazala I tilde por su caracter especiall Comm = Replace(Comm, "î", """ & ChrW(211) & """, 1) ' reemplazala O tilde por su caracter especial Comm = Replace(Comm, "ò", """ & ChrW(218) & """, 1) ' reemplazala U tilde por su caracter especial Comm = Replace(Comm, Chr(10), """" & " & Chr(10) & _ " & vbNewLine & """ ", 1) Print #oFile, " Dim HELPtxt as String" Print #oFile, " HELPtxt = """ & Comm & """" Print #oFile, " On Error Resume Next " ' ignorar error 91 en versiones antiguas Excel Print #oFile, " Cells(m1 , n1 + 9).Comment.Text Text:= HELPtxt" End If End If 'Segment CreateCode-07. En el caso de varios archivos, imprimir el ultimo archivo llamando las funciones de los demas. Nov 2023 If (subProj + 1) * 23 * 9 + 6 > f Then For max = 1 To subProj Print #oFile, " Call Project_" & i & "_" & max & "(VecType, m, n, m1, n1) ' " Next max Print #oFile, "" Print #oFile, "" max = 0 End If 'Segment CreateCode-08. Registrar datos de cada vector Do While Cells(m + 3, n - 1).Value <> "" ' ciclo para cada vector del proyecto nuevo Print #oFile, " If m = m1 + " & m - 3 & " Then ' vector " & k If Cells(m + 4, n).Value = 186 Then ' si es una grafica, llamar al proyecto 15. Print #oFile, " Call Project_15(15, m, n, m1, n1)" End If 'Else If Cells(m + 6, n + 2).Value = "Delta =" Then ' si es un modulo de derivadas llamar al proyecto 34. Print #oFile, " Call Project_2(2, m, n, m1, n1)" End If For i = 3 To 11 ' numero de filas de cada vector For j = -1 To 30 ' aumente o disminuya el numero de columnas para sacar el cogo (2 = una columna adicional a la derecha) If Cells(m + i, n + j).FormulaR1C1 <> "" Then ' lee todas las celdas de cada vector y escribe su formula On Error Resume Next CellValue = Replace(Cells(m + i, n + j).FormulaR1C1, """", """""") 'reemplaza una comilla por dos comillas para que el codigo generado quede sin errores. CellValue = Replace(CellValue, "‡", """ & ChrW(225) & """, 1) ' reemplazala a tilde por su caracter especial CellValue = Replace(CellValue, "Ž", """ & ChrW(233) & """, 1) ' reemplazala e tilde por su caracter especial CellValue = Replace(CellValue, "’", """ & ChrW(237) & """, 1) ' reemplazala i tilde por su caracter especial CellValue = Replace(CellValue, "—", """ & ChrW(243) & """, 1) ' reemplazala o tilde por su caracter especial CellValue = Replace(CellValue, "œ", """ & ChrW(250) & """, 1) ' reemplazala u tilde por su caracter especial CellValue = Replace(CellValue, "ç", """ & ChrW(193) & """, 1) ' reemplazala A tilde por su caracter especiall CellValue = Replace(CellValue, "ƒ", """ & ChrW(201) & """, 1) ' reemplazala E tilde por su caracter especial CellValue = Replace(CellValue, "ê", """ & ChrW(205) & """, 1) ' reemplazala I tilde por su caracter especiall CellValue = Replace(CellValue, "î", """ & ChrW(211) & """, 1) ' reemplazala O tilde por su caracter especial CellValue = Replace(CellValue, "ò", """ & ChrW(218) & """, 1) ' reemplazala U tilde por su caracter especial Print #oFile, " Cells(m + " & i & ", n + " & j & ").FormulaR1C1 =" & """" & CellValue & """" End If Next j Next i Print #oFile, " Cells(m + 3, n + 1).Interior.Color = " & """" & Cells(m + 3, n + 1).DisplayFormat.Interior.Color & """" ' color del vector Print #oFile, " Cells(m + 3, n + 1).Font.Size = " & """" & Cells(m + 3, n + 1).Font.Size & """" ' color del vector. 03 2024 Print #oFile, " Cells(m + 3, n + 1).Font.name = " & """" & Cells(m + 3, n + 1).Font.name & """" ' color del vector. 03 2024 Print #oFile, " Cells(m + 4, n - 1).Value = 1 " ' menu expandido Print #oFile, " Cells(m1 + 1, n1 + 1).Value = " & """" & Cells(m + 12, n).Value & """" ' nombre del proximo vector" 'Segment CreateCode-09. Pasar al siguiente vector m = m + 9 If Cells(m + 3, n - 1).Value = "" Then Print #oFile, " Cells(m1 + 2, n1 - 1).Value = " & (m - 3) / 9 ' cantidad de vectores para expandir el menu Else If max = 23 Then ' Nov 2023 Print #oFile, " MsgBox "" Press [ +Vector ] again, "" & vbNewLine & "" this is a LARGE PROJECT. "" & vbNewLine & vbNewLine & "" " & k - 1 & " magnitudes left.""" Else Print #oFile, " Call AddNewVector " End If End If k = k - 1 ' cuenta cuantos vectores quedan por agregar Print #oFile, " end if ' vector ends" 'Segment CreateCode-10. Terminar el ciclo de los vectores max = max + 1 ' Controlar la cantidad maxima de vectores por archivo. Nov 2023 If max = 24 Then Exit Do Loop 'Segment CreateCode-11. Configurar el elemento trayectoria si existe. May 2023 Print #oFile, " If m = m1 + " & m - 12 & " Then " flag = False i = 4 Do While Cells(m1 + i, n1 - 1) <> "" ' verificar si hay modulo de Trayectoria" If Cells(m1 + i, n1).Value = 186 Then flag = True End If i = i + 9 Loop If flag = True Then ' actualizar listado del modulo Trayectoria" Print #oFile, " ActiveSheet.DropDowns(""List2"").Select" Print #oFile, " With Selection ' " Print #oFile, " Do While .ListCount > 0 ' borrar lista" Print #oFile, " .ListIndex = .ListCount" Print #oFile, " .RemoveItem (.ListIndex)" Print #oFile, " Loop" Print #oFile, " i = 3" Print #oFile, " Do While Cells(m1 + i, n1 - 1) <> """" ' incluir todos los vectores a la lista" Print #oFile, " .AddItem Cells(m1 + i, n1 - 1).Value" Print #oFile, " i = i + 9" Print #oFile, " Loop" Print #oFile, " End With" Print #oFile, " Sheets(""CONFIG"").Range(""V6"").Value = """"" Print #oFile, " Cells(m1 + 9, n1 + 4).Select" Print #oFile, " Call DeleteGraphFunction" End If ' termina verif Trayectoria 'Segment CreateCode-11a. Codigo adicional para incluir celdas con informacion mas abajo del ultimo vector. Incluido en 02-2024 For i = 3 To 60 ' numero de filas de cada vector For j = -1 To 30 ' aumente o disminuya el numero de columnas para sacar el cogo (2 = una columna adicional a la derecha) If Cells(m + i, n + j).FormulaR1C1 <> "" Then ' lee todas las celdas de cada vector y escribe su formula On Error Resume Next CellValue = Replace(Cells(m + i, n + j).FormulaR1C1, """", """""") 'reemplaza una comilla por dos comillas para que el codigo generado quede sin errores. CellValue = Replace(CellValue, "‡", """ & ChrW(225) & """, 1) ' reemplazala a tilde por su caracter especial CellValue = Replace(CellValue, "Ž", """ & ChrW(233) & """, 1) ' reemplazala e tilde por su caracter especial CellValue = Replace(CellValue, "’", """ & ChrW(237) & """, 1) ' reemplazala i tilde por su caracter especial CellValue = Replace(CellValue, "—", """ & ChrW(243) & """, 1) ' reemplazala o tilde por su caracter especial CellValue = Replace(CellValue, "œ", """ & ChrW(250) & """, 1) ' reemplazala u tilde por su caracter especial CellValue = Replace(CellValue, "ç", """ & ChrW(193) & """, 1) ' reemplazala A tilde por su caracter especiall CellValue = Replace(CellValue, "ƒ", """ & ChrW(201) & """, 1) ' reemplazala E tilde por su caracter especial CellValue = Replace(CellValue, "ê", """ & ChrW(205) & """, 1) ' reemplazala I tilde por su caracter especiall CellValue = Replace(CellValue, "î", """ & ChrW(211) & """, 1) ' reemplazala O tilde por su caracter especial CellValue = Replace(CellValue, "ò", """ & ChrW(218) & """, 1) ' reemplazala U tilde por su caracter especial Print #oFile, " Cells(m + " & i + 9 & ", n + " & j & ").FormulaR1C1 =" & """" & CellValue & """" End If Next j Next i 'Escribir advertencia en la hoja actual Range(Cells(m + 61, 1), Cells(m + 61, 30)).Select With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .Color = 65535 .TintAndShade = 0 .PatternTintAndShade = 0 End With Cells(m + 61, 7).Select ActiveCell.FormulaR1C1 = _ " THE ADITIONAL DATA OUTSIDE THIS LINE WAS NOT RECORDED AND WILL BE LOST." Range("D50").Select 'Segment CreateCode-12. Escribir el comando de actualizar hoja para elultimo archivo. If (subProj + 1) * 23 * 9 + 7 > f Then ' Nov 2023 'Print #oFile, " Rotate" Print #oFile, " Call BlackWhiteDesk " 'actualizar fondo de la hoja. Feb 2024 Print #oFile, " Call PutEqBut " 'Poner botones de ecuaciones. Feb 2024 End If 'Segment CreateCode-13. Finalizar procedimiento para cada archivo de texto Print #oFile, " end if ' actualizar hoja" Print #oFile, "End Sub" Close #oFile 'Segment CreateCode-14. Si el numero de filas contadas es menorque las filas totales, repetir el ciclo. subProj = subProj + 1 If (subProj) * 23 * 9 + 6 < f Then GoTo split ' nov 2023 Else ' PC 'PC splitPC: 'Segment CreateCode-15. Preparar el nombre del archivo y del procedimiento If Cells(m1 + 1, n1 - 1).Value > 1 Then ' si se esta editando un proyecto se genera el codigo de la lista activo. i = Cells(m1 + 1, n1 - 1).Value ' valor de la celda vinculada a la lista Else ' si es un proyecto nuevo se genera el ñltimo nñmero de la lista + 1 i = 0 Do While Sheets("CONFIG").Cells(m2 + i, n2) <> "" i = i + 1 Loop End If If k > 23 Then FileName = FileName1 & "_" & subProj + 1 max = 1 Else FileName = FileName1 End If filepath = ThisWorkbook.Path & "\" & FileName & ".txt" Dim fso As Object Set fso = CreateObject("Scripting.FileSystemObject") On Error GoTo salida Set oFile = fso.CreateTextFile(filepath) 'Segment CreateCode-16. Generar Sub y encabezado de instrucciones. If k > 23 Then oFile.writeline "Sub Project_" & i & "_" & subProj + 1 & Lang & "(ByVal VecType, m, n, m1, n1 As Integer) ' " & FileName Else oFile.writeline "Sub Project_" & i & Lang & "(ByVal VecType, m, n, m1, n1 As Integer) ' " & FileName End If oFile.writeline " " oFile.writeline " ' Updated: " & Date oFile.writeline " ' Created by: " & Author oFile.writeline " ' Modified by: _________________" oFile.writeline " ' This is the code of your new project. " oFile.writeline " ' Steps to embed the code to ScienSolar: " oFile.writeline " ' Note 1: The number " & i & " in the name of this function must match the one in the list of the CONFIG sheet for this project. If not, please correct it." oFile.writeline " ' Note 2: This code will be integrated into the main code to automate the download of the project. " oFile.writeline " ' Note 3: The formulas and cell values generated here correspond only to the first 30 columns from INICIO to the right in the sheet. All your formulas and values are recommended to be written in these columns. " oFile.writeline " ' Step 1. Go to the CONFIG sheet (at the end of column C) and add the number of your new project to the last row in the projects list, and a short name in the corresponding langage column." oFile.writeline " ' Step 2. Make sure that the list of projects in CONFIG sheet has the correct ascending numbering. " oFile.writeline " ' Step 4. Open the VBA editor ( (Alt + F11 in Windows or Fn + Option + F11 in macOS). To avoid mistakes, make sure you only have one workbook open." oFile.writeline " ' Step 5. On the left, in the project explorer, select a non full module (or add a new one)." oFile.writeline " ' Step 6. Select all the code in this file, copy and paste it at the end of the existing code in the module (or in the new one)." oFile.writeline " ' Step 7. To load the project and to check it in a new sheet, go to the CONFIG sheet and click the New Sheet button, then select the project from the list and click the +Vector button. " oFile.writeline " ' Step 8. Click any XYZ button to get the project in the coordinate system. Enjoy it! " oFile.writeline " ' Visit www.sciensolar.com for news and updates of © ScienSolar." oFile.writeline " " oFile.writeline " " 'Segment CreateCode-17. Registrar valores del tablero de control If m < 9 Then oFile.writeline " Cells(m1 -1, n1 + 2).FormulaR1C1 =" & """" & Cells(m - 1, n + 2).FormulaR1C1 + 1 & """" 'grabar el fondo de la hoja For i = 0 To 3 ' numero de filas del tablero. Modificado Feb 2024. V.1.41 For j = 0 To 8 ' numero de columnas del tablero If Cells(m1 + i, n1 + j).FormulaR1C1 <> "" Then ' lee todas las celdas y escribe su formula CellValue = Replace(Cells(m1 + i, n1 + j).FormulaR1C1, """", """""") 'reemplaza una comilla por dos comillas para que el codigo generado quede sin errores. oFile.writeline " Cells(m1 + " & i & ", n1 + " & j & ").FormulaR1C1 =" & """" & CellValue & """" End If Next j Next i oFile.writeline " Cells(m1, n1 + 9).FormulaR1C1 = " & """" & Cells(m, n + 9).FormulaR1C1 & """" ' insertar comentario HELP - Updated 05-2023 If Not Cells(m, n + 9).Comment Is Nothing Then Comm = Cells(m, n + 9).Comment.Text Comm = Replace(Comm, " ", "", 1) Comm = Replace(Comm, "‡", """ & ChrW(225) & """, 1) ' reemplazala a tilde por su caracter especial Comm = Replace(Comm, "Ž", """ & ChrW(233) & """, 1) ' reemplazala e tilde por su caracter especial Comm = Replace(Comm, "’", """ & ChrW(237) & """, 1) ' reemplazala i tilde por su caracter especial Comm = Replace(Comm, "—", """ & ChrW(243) & """, 1) ' reemplazala o tilde por su caracter especial Comm = Replace(Comm, "œ", """ & ChrW(250) & """, 1) ' reemplazala u tilde por su caracter especial Comm = Replace(Comm, "ç", """ & ChrW(193) & """, 1) ' reemplazala A tilde por su caracter especiall Comm = Replace(Comm, "ƒ", """ & ChrW(201) & """, 1) ' reemplazala E tilde por su caracter especial Comm = Replace(Comm, "ê", """ & ChrW(205) & """, 1) ' reemplazala I tilde por su caracter especiall Comm = Replace(Comm, "î", """ & ChrW(211) & """, 1) ' reemplazala O tilde por su caracter especial Comm = Replace(Comm, "ò", """ & ChrW(218) & """, 1) ' reemplazala U tilde por su caracter especial Comm = Replace(Comm, Chr(10), """" & " & Chr(10) & _ " & vbNewLine & """ ", 1) oFile.writeline " Dim HELPtxt as String" oFile.writeline " HELPtxt = """ & Comm & """" oFile.writeline " On Error Resume Next " ' ignorar error 91 en versiones antiguas Excel oFile.writeline " Cells(m1 , n1 + 9).Comment.Text Text:= HELPtxt" End If End If 'Segment CreateCode-18. En el caso de varios archivos, imprimir el ultimo archivo llamando las funciones de los demas. Nov 2023 If (subProj + 1) * 23 * 9 + 6 > f Then For max = 1 To subProj - 1 oFile.writeline " Call Project_" & i & "_" & max & "(VecType, m, n, m1, n1) ' " Next max oFile.writeline "" oFile.writeline "" max = 0 End If 'Segment CreateCode-19. Registrar datos de cada vector Do While Cells(m + 3, n - 1).Value <> "" ' ciclo para cada vector del proyecto nuevo oFile.writeline " If m = m1 + " & m - 3 & " Then ' vector " & k If Cells(m + 4, n).Value = 186 Then ' si es una gršfica, llamar al proyecto 15. oFile.writeline " Call Project_15(15, m, n, m1, n1)" End If If Cells(m + 6, n + 2).Value = "Delta =" Then ' si es un modulo de derivadas llamar al proyecto 34. oFile.writeline " Call Project_2(2, m, n, m1, n1)" End If For i = 3 To 11 ' nÒmero de filas de cada vector For j = -1 To 30 ' aumente o disminuya el numero de columnas para sacar codigo (2 = una columna adicional a la derecha) If Cells(m + i, n + j).Value <> "" Then ' lee todas las celdas de cada vector y escribe su formula On Error Resume Next CellValue = Replace(Cells(m + i, n + j).FormulaR1C1, """", """""") 'reemplaza una comilla por dos comillas para que el c‹digo generado quede sin errores. CellValue = Replace(CellValue, "‡", """ & ChrW(225) & """, 1) ' reemplazala a tilde por su caracter especial CellValue = Replace(CellValue, "Ž", """ & ChrW(233) & """, 1) ' reemplazala e tilde por su caracter especial CellValue = Replace(CellValue, "’", """ & ChrW(237) & """, 1) ' reemplazala i tilde por su caracter especial CellValue = Replace(CellValue, "—", """ & ChrW(243) & """, 1) ' reemplazala o tilde por su caracter especial CellValue = Replace(CellValue, "œ", """ & ChrW(250) & """, 1) ' reemplazala u tilde por su caracter especial CellValue = Replace(CellValue, "ç", """ & ChrW(193) & """, 1) ' reemplazala A tilde por su caracter especiall CellValue = Replace(CellValue, "ƒ", """ & ChrW(201) & """, 1) ' reemplazala E tilde por su caracter especial CellValue = Replace(CellValue, "ê", """ & ChrW(205) & """, 1) ' reemplazala I tilde por su caracter especiall CellValue = Replace(CellValue, "î", """ & ChrW(211) & """, 1) ' reemplazala O tilde por su caracter especial CellValue = Replace(CellValue, "ò", """ & ChrW(218) & """, 1) ' reemplazala U tilde por su caracter especial oFile.writeline " Cells(m + " & i & ", n + " & j & ").FormulaR1C1 =" & """" & CellValue & """" End If Next j Next i oFile.writeline " Cells(m + 3, n + 1).Interior.color = " & """" & Cells(m + 3, n + 1).DisplayFormat.Interior.Color & """" ' color del vector oFile.writeline " Cells(m + 3, n + 1).Font.Size = " & """" & Cells(m + 3, n + 1).Font.Size & """" ' color del vector. 03 2024 oFile.writeline " Cells(m + 3, n + 1).Font.name = " & """" & Cells(m + 3, n + 1).Font.name & """" ' color del vector. 03 2024 oFile.writeline " Cells(m + 4, n - 1).Value = 1 " ' menu expandido oFile.writeline " Cells(m1 + 1, n1 + 1).Value = " & """" & Cells(m + 12, n).Value & """" ' nombre del proximo vector" 'Segment CreateCode-20. Pasar al siguiente vector m = m + 9 If Cells(m + 3, n - 1).Value = "" Then oFile.writeline " Cells(m1 + 2, n1 - 1).Value = " & (m - 3) / 9 ' cantidad de vectores para expandir el menu Else If max = 23 Then ' Nov 2023 oFile.writeline " MsgBox "" Press [ +Vector ] again, "" & vbNewLine & "" this is a LARGE PROJECT. "" & vbNewLine & vbNewLine & "" " & k - 1 & " magnitudes left.""" Else oFile.writeline " Call AddNewVector " End If End If k = k - 1 ' cuenta cuantos vectores quedan por agregar oFile.writeline " end if ' vector ends" ' 'Segment CreateCode-21. Terminar el ciclo de los vectores max = max + 1 ' Controlar la cantidad maxima de vectores por archivo. Nov 2023 If max = 24 Then Exit Do Loop 'Segment CreateCode-22. Configurar Trayectoria sila hay. May 2023 oFile.writeline " If m = m1 + " & m - 12 & " Then " flag = False i = 4 Do While Cells(m1 + i, n1 - 1) <> "" ' verificar si hay modulo de Trayectoria" If Cells(m1 + i, n1).Value = 186 Then flag = True End If i = i + 9 Loop If flag = True Then ' actualizar listado del modulo Trayectoria" oFile.writeline " ActiveSheet.DropDowns(""List2"").Select" oFile.writeline " With Selection ' actualizar la lista para incluir los vectores posteriores" oFile.writeline " Do While .ListCount > 0 ' borrar lista" oFile.writeline " .ListIndex = .ListCount" oFile.writeline " .RemoveItem (.ListIndex)" oFile.writeline " Loop" oFile.writeline " i = 3" oFile.writeline " Do While Cells(m1 + i, n1 - 1) <> """" ' incluye todos los vectores en la lista del m‹dulo de gršfico" oFile.writeline " .AddItem Cells(m1 + i, n1 - 1).Value" oFile.writeline " i = i + 9" oFile.writeline " Loop" oFile.writeline " End With" oFile.writeline " Sheets(""CONFIG"").Range(""V6"").Value = """"" oFile.writeline " Cells(m1 + 9, n1 + 4).Select" oFile.writeline " Call DeleteGraphFunction" End If 'Segment CreateCode-22a. (11a) Codigo adicional para incluir celdas con informacion mas abajo del ultimo vector. Incluido en 02-2024 For i = 3 To 60 ' numero de filas de cada vector For j = -1 To 30 ' aumente o disminuya el numero de columnas para sacar el cogo (2 = una columna adicional a la derecha) If Cells(m + i, n + j).FormulaR1C1 <> "" Then ' lee todas las celdas de cada vector y escribe su formula On Error Resume Next CellValue = Replace(Cells(m + i, n + j).FormulaR1C1, """", """""") 'reemplaza una comilla por dos comillas para que el codigo generado quede sin errores. CellValue = Replace(CellValue, "‡", """ & ChrW(225) & """, 1) ' reemplazala a tilde por su caracter especial CellValue = Replace(CellValue, "Ž", """ & ChrW(233) & """, 1) ' reemplazala e tilde por su caracter especial CellValue = Replace(CellValue, "’", """ & ChrW(237) & """, 1) ' reemplazala i tilde por su caracter especial CellValue = Replace(CellValue, "—", """ & ChrW(243) & """, 1) ' reemplazala o tilde por su caracter especial CellValue = Replace(CellValue, "œ", """ & ChrW(250) & """, 1) ' reemplazala u tilde por su caracter especial CellValue = Replace(CellValue, "ç", """ & ChrW(193) & """, 1) ' reemplazala A tilde por su caracter especiall CellValue = Replace(CellValue, "ƒ", """ & ChrW(201) & """, 1) ' reemplazala E tilde por su caracter especial CellValue = Replace(CellValue, "ê", """ & ChrW(205) & """, 1) ' reemplazala I tilde por su caracter especiall CellValue = Replace(CellValue, "î", """ & ChrW(211) & """, 1) ' reemplazala O tilde por su caracter especial CellValue = Replace(CellValue, "ò", """ & ChrW(218) & """, 1) ' reemplazala U tilde por su caracter especial oFile.writeline " Cells(m + " & i + 9 & ", n + " & j & ").FormulaR1C1 =" & """" & CellValue & """" End If Next j Next i 'Escribir advertencia en la hoja actual Range(Cells(m + 61, 1), Cells(m + 61, 30)).Select With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .Color = 65535 .TintAndShade = 0 .PatternTintAndShade = 0 End With Cells(m + 61, 7).Select ActiveCell.FormulaR1C1 = _ " THE ADITIONAL DATA OUTSIDE THIS LINE WAS NOT RECORDED AND WILL BE LOST." Range("D50").Select 'Segment CreateCode-23. Escribir el comando de actualizar hoja para elultimo archivo. If (subProj + 1) * 23 * 9 + 7 > f Then ' Nov 2023 'oFile.writeline " Rotate" oFile.writeline " Call BlackWhiteDesk " 'actualizar fondo de la hoja. Feb 2024 oFile.writeline " Call PutEqBut " 'Poner botones de ecuaciones. Feb 2024 End If 'Segment CreateCode-24. Finalizar procedimiento para cada archivo de texto oFile.writeline " end if ' actualizar hoja" oFile.writeline "End Sub" oFile.Close 'Segment CreateCode-25. Si el numero de filas contadas es menorque las filas totales, repetir el ciclo. subProj = subProj + 1 If (subProj) * 23 * 9 + 6 < f Then GoTo splitPC ' nov 2023 End If ' End Mac or PC MsgBox "The file(s) with the code has (have) been saved in " & filepath & vbCrLf & "IMPORTANT: " & vbCrLf _ & " This code includes data only for the first 30 columns and " _ & "for the dashboard. If the data has been stored outside of this region, it will be lost. " flag = True ' todo se grabo exitosamente salida: If flag = False Then ' no hubo grabacion MsgBox "The file was not exported. Check that the file name does not contain special characters such as accents or other illegal symbols.", vbCritical End If End Sub Sub BlackWhiteDesk() 'Funcion paracambiar la apriencia de la hoja '© 2022 A Becerra. ScienSolar.com Application.ScreenUpdating = False ' Segment BW-01. Definicion de variables Dim fila As Range Dim m As Integer Dim n As Integer Dim i As Integer Dim v As Integer Set fila = ActiveSheet.Cells.Find(What:="INICIO") m = fila.Offset(1, 0).Row n = fila.Offset(1, 1).Column Set fila = Nothing If IsNumeric(Cells(m - 1, n + 2).Value) = True Then i = Cells(m - 1, n + 2).Value Else i = 0 End If If i > 2 Then i = 0 ' el valor3 viene del odigo de los proyectos y corresponde a cero If IsNumeric(i) = False Then i = 0 ' Segment BW-02. Parametros de la apariencia estandar de la hoja If i = 2 Then ' fondo negro marco gris Range("N2:AE6,L3:M6,H6:K6,D7:AE347").Select 'marco With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorDark1 .TintAndShade = -0.149998474074526 .PatternTintAndShade = 0 End With With Selection.Font .ThemeColor = xlThemeColorAccent1 .TintAndShade = -0.249977111117893 End With Range("H9:T343").Select ' fondo With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 .PatternTintAndShade = 0 End With With Selection.Font .ThemeColor = xlThemeColorDark1 .TintAndShade = 0 End With Range("V9:AD343").Select ' texto With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorDark1 .TintAndShade = 0 .PatternTintAndShade = 0 End With With Selection.Font .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 End With Range("H6:T8,V6:AD8").Select ' Encabezado With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .Color = 255 .TintAndShade = 0 .PatternTintAndShade = 0 End With With Selection.Font .ThemeColor = xlThemeColorDark1 .TintAndShade = 0 .name = "Calibri" .Size = 16 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ThemeFont = xlThemeFontMinor End With With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom End With Range("F7:F343").Select With Selection.Font .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 End With Range("G7:G343").Select With Selection.Font .Color = -16776961 .TintAndShade = 0 End With 'Color de los ejes Application.Union(Cells(m + 1, n + 4), Cells(m + 2, n + 4), Cells(m + 3, n + 4)).Select With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorDark1 .TintAndShade = 0 .PatternTintAndShade = 0 End With Cells(m, n + 4).Select With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorAccent6 .TintAndShade = -0.249977111117893 .PatternTintAndShade = 0 End With Cells(m - 1, n + 2).Value = 1 Range("G7").Select End If ' Segment BW-03. Parametros de la apariencia opcional 1 If i = 0 Then 'fondo negro Range("D7:AE347").Select With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 .PatternTintAndShade = 0 End With With Selection.Font .ThemeColor = xlThemeColorDark1 .TintAndShade = 0 End With Range("L2:AE6").Select With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 .PatternTintAndShade = 0 End With With Selection.Font .ThemeColor = xlThemeColorDark1 .TintAndShade = 0 End With Range("H6:L6").Select With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 .PatternTintAndShade = 0 End With With Selection.Font .ThemeColor = xlThemeColorDark1 .TintAndShade = 0 End With 'Color de los ejes Application.Union(Cells(m, n + 4), Cells(m + 1, n + 4), Cells(m + 2, n + 4), Cells(m + 3, n + 4)).Select With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorDark1 .TintAndShade = 0 .PatternTintAndShade = 0 End With Range("G7").Select Cells(m - 1, n + 2).Value = 2 End If ' Segment BW-04. Parametros de la apariencia opcional 2 If i = 1 Then 'fondo blanco marco gris Range("N2:AE6,L3:M6,H6:K6,D7:AE347").Select 'marco Range("D7").Activate With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorDark1 .TintAndShade = -0.149998474074526 .PatternTintAndShade = 0 End With With Selection.Font .ThemeColor = xlThemeColorAccent1 .TintAndShade = -0.249977111117893 End With Range("H9:T343").Select With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorDark1 .TintAndShade = 0 .PatternTintAndShade = 0 End With With Selection.Font .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 End With Range("V8:AD343").Select ' texto With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorDark1 .TintAndShade = 0 .PatternTintAndShade = 0 End With With Selection.Font .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 End With Range("H6:T8,V6:AD8").Select ' Encabezado With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .Color = 255 .TintAndShade = 0 .PatternTintAndShade = 0 End With With Selection.Font .ThemeColor = xlThemeColorDark1 .TintAndShade = 0 .name = "Calibri" .Size = 16 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ThemeFont = xlThemeFontMinor End With With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom End With Range("F7:F343").Select With Selection.Font .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 End With Range("G7:G343").Select With Selection.Font .Color = -16776961 .TintAndShade = 0 End With 'Color de los ejes Application.Union(Cells(m, n + 4), Cells(m + 1, n + 4), Cells(m + 2, n + 4), Cells(m + 3, n + 4)).Select With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorLight1 .TintAndShade = 0 .PatternTintAndShade = 0 End With Range("G7").Select Cells(m - 1, n + 2).Value = 0 End If 'Segment BW-04a. Formato a columna izquierda de datos Range("D8:G8").Select With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorAccent6 .TintAndShade = -0.25 .PatternTintAndShade = 0 End With With Selection.Font .ThemeColor = xlThemeColorDark1 .TintAndShade = 0 End With Range("G10:G343").Select Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _ "=LARGO(ESPACIOS(G10))>0" Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority With Selection.FormatConditions(1).Font .ThemeColor = xlThemeColorDark1 .TintAndShade = 0 End With With Selection.FormatConditions(1).Interior .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorAccent6 .TintAndShade = -0.249946592608417 End With Selection.FormatConditions(1).StopIfTrue = False Range("G7").Select ' Segment BW-05. Actualizacion de la hoja Rotate Application.ScreenUpdating = True End Sub Sub DataOutput(ByVal m, n As Integer) ' may 2023 Lx = ActiveSheet.Cells(m + 9, n - 1).Value Ly = ActiveSheet.Cells(m + 9, n).Value Lz = ActiveSheet.Cells(m + 9, n + 1).Value Lox = ActiveSheet.Cells(m + 7, n - 1).Value Loy = ActiveSheet.Cells(m + 7, n).Value Loz = ActiveSheet.Cells(m + 7, n + 1).Value Cells(Cells(m + 10, n).Value, Cells(m + 11, n).Value).Value = "DATOS DEL VECTOR " & Cells(m + 3, n).Value Cells(Cells(m + 10, n).Value + 1, Cells(m + 11, n).Value).Value = " # Paso" Cells(Cells(m + 10, n).Value + 1, Cells(m + 11, n).Value + 1).Value = Cells(m + 3, n).Value & "ox" Cells(Cells(m + 10, n).Value + 1, Cells(m + 11, n).Value + 2).Value = Cells(m + 3, n).Value & "oy" Cells(Cells(m + 10, n).Value + 1, Cells(m + 11, n).Value + 3).Value = Cells(m + 3, n).Value & "oz" Cells(Cells(m + 10, n).Value + 1, Cells(m + 11, n).Value + 4).Value = Cells(m + 3, n).Value & "x" Cells(Cells(m + 10, n).Value + 1, Cells(m + 11, n).Value + 5).Value = Cells(m + 3, n).Value & "y" Cells(Cells(m + 10, n).Value + 1, Cells(m + 11, n).Value + 6).Value = Cells(m + 3, n).Value & "z" 'Agregar columna para la formula adicional: If Cells(m + 11, n + 2).Value <> "" Then Cells(Cells(m + 10, n).Value + 1, Cells(m + 11, n).Value + 7).Value = Cells(m + 11, n + 2).Address(rowabsolute = True, columnAbsolute = True) & " (...)" End If If Cells(m + 11, n + 3).Value <> "" Then Cells(Cells(m + 10, n).Value + 1, Cells(m + 11, n).Value + 8).Value = Cells(m + 11, n + 3).Address(rowabsolute = True, columnAbsolute = True) & " (...)" End If Z = 0 'Identificar la ultima fila para ingresar datos. Do While Cells(Cells(m + 10, n).Value + Z, Cells(m + 11, n).Value).Value <> "" Z = Z + 1 Loop Cells(Cells(m + 10, n).Value + Z, Cells(m + 11, n).Value).Value = Z - 1 Cells(Cells(m + 10, n).Value + Z, Cells(m + 11, n).Value + 1).Value = Lox Cells(Cells(m + 10, n).Value + Z, Cells(m + 11, n).Value + 2).Value = Loy Cells(Cells(m + 10, n).Value + Z, Cells(m + 11, n).Value + 3).Value = Loz Cells(Cells(m + 10, n).Value + Z, Cells(m + 11, n).Value + 4).Value = Lx Cells(Cells(m + 10, n).Value + Z, Cells(m + 11, n).Value + 5).Value = Ly Cells(Cells(m + 10, n).Value + Z, Cells(m + 11, n).Value + 6).Value = Lz If Cells(m + 11, n + 2).Value <> "" Then 'datos de la primera celda adicional Cells(Cells(m + 10, n).Value + Z, Cells(m + 11, n).Value + 7).Value = Cells(m + 11, n + 2).Value End If If Cells(m + 11, n + 3).Value <> "" Then 'datos de la segunda celda adicional Cells(Cells(m + 10, n).Value + Z, Cells(m + 11, n).Value + 8).Value = Cells(m + 11, n + 3).Value End If End Sub Sub ManualOnline() If Range("T2").Value = 2 Then ActiveWorkbook.FollowHyperlink Address:="https://www.amazon.com/dp/B0BR9GJLLY?ref_=pe_3052080_397514860""" Else ActiveWorkbook.FollowHyperlink Address:="https://www.amazon.com/-/es/PhD-Ariel-Rey-Becerra/dp/B0BTGH4BP8/ref=tmm_hrd_swatch_0?_encoding=UTF8&qid=&sr=" End If End Sub Sub PutEq() ' Copy equations from 3DModels sheet to activesheet Dim T_color Dim flag As Boolean T_color = Range("F3").Interior.Color Dim EqN As String Dim Obj As Object EqN = ActiveSheet.Buttons(Application.Caller).Caption 'verificar si 3DModels existe flag = False Dim nombre As Variant nombre = "3DModels" For Each Obj In ThisWorkbook.Sheets If nombre = Obj.name Then flag = True End If Next Obj If flag = False Then MsgBox "The spreadsheet named 3DModels that contains the object could not be found. Download the spreadsheet" _ & " from ScienSolar.com and move it into this book to show the object..", vbCritical GoTo salida End If 'Continuar si existe 3DModels If ActiveSheet.Buttons(Application.Caller).TopLeftCell.Column = 29 Then ActiveSheet.Buttons(Application.Caller).TopLeftCell.Offset(-1, -5).Activate Else ActiveSheet.Buttons(Application.Caller).TopLeftCell.Offset(0, 1).Activate End If If CheckExists(EqN) = False Then For Each Obj In Sheets("3DModels").Shapes If UCase(Obj.name) = UCase(EqN) Then Sheets("3DModels").Shapes(EqN).Copy ActiveSheet.Paste With ActiveSheet.Shapes(EqN) .TextFrame2.TextRange.Characters.Font.Fill.ForeColor.RGB = T_color .TextFrame2.TextRange.Characters.Font.Fill.Transparency = 0.2 End With End If Next Obj ActiveCell.Offset(10, -1).Activate Else ActiveSheet.Shapes(EqN).Delete End If salida: Set Obj = Nothing End Sub Sub PutEqBut() ' Put equations buttons in text zone Dim EqN As String For j = 4 To 30 For i = 9 To 343 On Error Resume Next If Left(Cells(i, j).Value, 3) = "(Eq" Then Cells(i, j).Select EqN = Cells(i, j).Value ActiveSheet.Buttons.Add(ActiveCell.Left, ActiveCell.Top + 15, 55, 15).Select Selection.OnAction = "PutEq" Selection.Characters.Text = EqN With Selection.Characters(Start:=1, Length:=3).Font .name = "Calibri" .FontStyle = "Normal" .Size = 12 End With End If Next i Next j Range("G7").Select End Sub Sub AddObject() ' Agregar /eliminar objetos nuevos a proyectos (compuestos de un vector o mas. Generado mar 2024, v. 1,42 Application.ScreenUpdating = False Dim fila As Range Dim m, n, A, i, BeginRow, EndRow, LastRow, RowQty, ObjQty As Integer Dim flag As Boolean Set fila = ActiveSheet.Cells.Find(What:="INICIO") m = fila.Offset(1, 0).Row n = fila.Offset(1, 1).Column Set fila = Nothing If IsNumeric(Cells(2, 2).Value) = True And Cells(2, 2).Value <> "" Then ObjQty = Cells(2, 2).Value Else ObjQty = 1 End If 'Segment AddObject-01. Definir filas inicial y final. If IsNumeric(Cells(3, 2).Value) = True And IsNumeric(Cells(3, 3).Value) = True Then BeginRow = Cells(3, 2).Value EndRow = Cells(3, 3).Value RowQty = EndRow - BeginRow + 1 Else MsgBox " The numbers of rows in " & Cells(3, 2).Address(0, 0) & " and " & Cells(3, 3).Address(0, 0) & " are incorrect." GoTo final End If 'Segment AddObject-02. Verificar cuantos vectores hay en al hoja actualmente. i = 0 flag = False Do While Cells(m + 3 + 9 * i, n - 1).Value <> "" If Cells(m + 3 + 9 * i, n - 1).Value = "" Then flag = True End If i = i + 1 Loop If BeginRow > 0 And EndRow > 0 Then ' Verificar que los datos ingresados sean correctos. If i * 9 < 15 Or BeginRow < 15 Then ' verificar que no sea el primer vector. MsgBox "The object to be copied must be after row 14. The operation was not performed." GoTo final End If If EndRow - BeginRow < 0 Then ' verificar que los numeros ingresados sean correctos MsgBox "The last row is smaller than the first. The operation was not performed." GoTo final End If If Int((EndRow - BeginRow + 1) / 9) <> (EndRow - BeginRow + 1) / 9 Then MsgBox "The number of rows indicated is not correct and does not correspond to a complete object. " _ & "Verify that the first indicated row (" & BeginRow & ") begins in a vector and the last one (" & EndRow _ & ") corresponds to the last row of the same or another vector. The operation was not performed." Rows(BeginRow & ":" & EndRow).Select GoTo final End If ' Copiar o cortar y pegar el objeto entero (ejemplo linea entera) If Cells(2, 2).Value = "ENTIRE" Then If Application.Caller = "AddButt" Then Dim MainSheet As String Dim OldSheet As String MainSheet = ActiveSheet.name ActiveSheet.Copy After:=Sheets(MainSheet) OldSheet = ActiveSheet.name ActiveSheet.Range("A" & BeginRow & ":G" & EndRow).Select Selection.Cut Sheets(MainSheet).Select ActiveSheet.Paste Destination:=ActiveSheet.Cells(m + 3 + 9 * i, 1) Columns("A:G").Select Selection.Replace What:="'" & OldSheet & "'!", Replacement:="", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False Sheets(OldSheet).Select Application.DisplayAlerts = False ActiveWindow.SelectedSheets.Delete Application.DisplayAlerts = True Sheets(MainSheet).Select Cells(m + 3 + 9 * i, 1).FormulaR1C1 = "=R[-9]C+1" Range("A106").Select Else If Cells(m + 1 + 9 * i, 1).Row - RowQty * ObjQty < BeginRow Then MsgBox "When performing this operation, the objects that are before the row that was established as a minimum are deleted, therefore THIS ACTION WILL NOT BE EXECUTED. Please modify the number of objects or the rows range." Else Range("A" & Cells(m + 3 + 9 * i, 1).Row - RowQty * ObjQty & ":G" & Cells(m + 3 + 9 * i, 1).Row).Select Selection.Delete Shift:=xlUp Cells(m + 5, n - 1).Value = 5000 End If End If Else ' copiar y pegrar los elementos indicados (ejemplo dL) If Application.Caller = "AddButt" Then Range("A" & BeginRow & ":E" & EndRow).Select Selection.Copy Do While ObjQty > 0 ActiveSheet.Paste Destination:=ActiveSheet.Cells(m + 3 + 9 * i, 1) m = m + RowQty ObjQty = ObjQty - 1 Loop Application.CutCopyMode = False Else If Cells(m + 1 + 9 * i, 1).Row - RowQty * ObjQty < BeginRow Then MsgBox "When performing this operation, the objects that are before the row that was established as a minimum are deleted, therefore THIS ACTION WILL NOT BE EXECUTED. Please modify the number of objects or the rows range." Else Range("A" & Cells(m + 3 + 9 * i, 1).Row - RowQty * ObjQty & ":E" & Cells(m + 3 + 9 * i, 1).Row).Select Selection.Delete Shift:=xlUp Cells(m + 5, n - 1).Value = 5000 End If End If End If End If Range("G7").Select Rotate final: Application.ScreenUpdating = True End Sub Sub AutoScale() ' Added 20-06-2024 to v 1.5 'Module to configure scale according to the max value of the vector positions or coordinates Dim A As Variant Dim B As Variant Dim C As Variant Dim fila As Range Dim m As Integer Dim n As Integer A = Array() Set fila = Cells.Find(What:="INICIO") m = fila.Offset(1, 0).Row n = fila.Offset(1, 1).Column Set fila = Nothing InitValues = 0 i = 0 j = 0 B = Cells(m + 2, n + 3).Value On Error GoTo msg ''Escala de acuerdo al max de las posiciones Do While ActiveSheet.Cells(m + 3 + i * 9, n - 1).Value <> "" If Cells(m + 5 + i * 9, n + 1).Value < 1 Then ReDim Preserve A(j + 5) A(j) = Abs(Cells(m + 7 + i * 9, n - 1).Value) A(j + 1) = Abs(Cells(m + 7 + i * 9, n).Value) A(j + 2) = Abs(Cells(m + 7 + i * 9, n + 1).Value) End If i = i + 1 j = j + 3 Loop C = Cells(m + 3, n + 3).Value / WorksheetFunction.max(A) 'Escoger entre tres escalas diferentes If B = C Then C = C / 2 GoTo Pos Else If B = C / 2 Then GoTo Coord Else GoTo Pos End If End If 'Escala de acuerdo al max de las coordenadas Coord: i = 0 j = 0 Do While ActiveSheet.Cells(m + 3 + i * 9, n - 1).Value <> "" If Cells(m + 5 + i * 9, n + 1).Value < 1 Then ReDim Preserve A(j + 5) A(j) = Abs(Cells(m + 9 + i * 9, n - 1).Value) A(j + 1) = Abs(Cells(m + 9 + i * 9, n).Value) A(j + 2) = Abs(Cells(m + 9 + i * 9, n + 1).Value) End If i = i + 1 j = j + 3 Loop C = Cells(m + 3, n + 3).Value / WorksheetFunction.max(A) Pos: If IsNumeric(C) Then Cells(m + 2, n + 3).Value = C Else msg: MsgBox "The scale could not be modified because there is no data." End If Rotate End Sub