Posts

Showing posts from October, 2025

fixed 😃😃😃😃😃

Sub Select_Bulk_Data_InputBox_Final4()     Dim sheetName As String     sheetName = "Data 1" ' <<-- Change only this if needed          Dim wb As Workbook, ws As Worksheet, rng As Range     Dim inputData As String, arrInput As Variant     Dim searchValues() As String, cleanedValues() As String     Dim removeChars As String, arrRemove As Variant     Dim removeProvided As Boolean     Dim colInput As String, arrCols As Variant     Dim validCols As Collection     Dim resultSheet As Worksheet     Dim i As Long, j As Long, k As Long     Dim cell As Range, cellValue As String     Dim lastCol As Long, foundCount As Long     Dim isFound As Boolean, msgText As String, cleaned As String     On Error GoTo ErrHandler     Application.ScreenUpdating = False     Application.EnableEvents = False     Set wb ...

fixed 😃😃😃

Sub Select_Bulk_Data_InputBox_Final3()     Dim sheetName As String     sheetName = "Data 1" ' <<-- Change the sheet name here only (exact name)          Dim wb As Workbook     Dim ws As Worksheet     Dim rng As Range     Dim inputData As String     Dim arrInput As Variant     Dim searchValues() As String     Dim cleanedValues() As String     Dim removeChars As String     Dim arrRemove As Variant     Dim removeProvided As Boolean     Dim colInput As String     Dim arrCols As Variant     Dim validCols As Collection     Dim resultSheet As Worksheet     Dim i As Long, j As Long, k As Long     Dim cell As Range     Dim cellValue As String     Dim lastCol As Long     Dim foundCount As Long     Dim isFound As Boolean     Dim msgText As String ...

fixed submain 🐥

' ===== MAIN MACRO ===== Sub MainMacro()     Dim inputData As String     ' Step 1 — Get data from the selected text file     inputData = GetTextFromFile()     ' Step 2 — Check if user canceled or file was empty     If inputData = "" Then         MsgBox "No data selected or file is empty.", vbExclamation         Exit Sub     End If     ' Step 3 — Use the data (you can replace this logic)     MsgBox "Text file data loaded successfully!" & vbCrLf & vbCrLf & _            Left(inputData, 500) & vbCrLf & "..." & vbCrLf & "(Only first 500 characters shown)", vbInformation     ' Step 4 — You can process or display the data below     ' Example: Debug.Print inputData     ' Or write it into cells, etc. End Sub ' ===== HELPER FUNCTION ===== Function GetTextFromFile() As String     Dim...

fixed 😃😃

Option Explicit Sub Select_Bulk_Data_InputBox_Final3()     Dim sheetName As String     sheetName = "Data 1" ' <<-- Change the sheet name here only (exact name)          Dim wb As Workbook     Dim ws As Worksheet     Dim rng As Range     Dim inputData As String     Dim arrInput As Variant     Dim searchValues() As String     Dim cleanedValues() As String     Dim removeChars As String     Dim arrRemove As Variant     Dim removeProvided As Boolean     Dim colInput As String     Dim arrCols As Variant     Dim validCols As Collection     Dim resultSheet As Worksheet     Dim i As Long, j As Long, k As Long     Dim cell As Range     Dim cellValue As String     Dim lastCol As Long     Dim foundCount As Long     Dim isFound As Boolean     Dim msgTex...

resume baby

resume Resume wordResume

submain macro

Sub MainMacro()     Dim bulkData As String     Dim lines() As String     Dim i As Long     ' Get large input text from the user     bulkData = GetLargeInput("Paste your bulk data below:")     ' Split data by line breaks     lines = Split(bulkData, vbCrLf)     ' Clear existing data on the active sheet     Cells.Clear     ' Insert each line into a new row in column A     For i = LBound(lines) To UBound(lines)         Cells(i + 1, 1).Value = lines(i)     Next i     MsgBox "All data has been successfully added to the sheet!" & vbCrLf & _            "Total lines: " & (UBound(lines) - LBound(lines) + 1), vbInformation End Sub '--------------------------------------- ' Function to get large input via Notepad '--------------------------------------- Function GetLargeInput(prompt As String) As String  ...

argument

Sub MainMacro()     ' Get large input text from the user     Dim bulkData As String     bulkData = GetLargeInput("Paste your bulk data below:")     ' Example: Display the first 500 characters of the input to confirm     MsgBox "You entered: " & Left(bulkData, 500) & vbCrLf & vbCrLf & "Total length: " & Len(bulkData) End Sub Function GetLargeInput(prompt As String) As String     Dim tempFile As String     Dim fileNum As Integer     Dim userInput As String     ' Create a temporary text file in the user's temp folder     tempFile = Environ("TEMP") & "\LargeInput.txt"     ' Open Notepad with the temp file     Shell "notepad.exe " & tempFile, vbNormalFocus     MsgBox "Please paste your large text into Notepad and save it (Ctrl+S), then close Notepad. Click OK when done.", vbInformation     ' Wait until user closes Notepad ...

Helper function

Private Function GetLargeInput(prompt As String, title As String) As String     Dim tempFile As String     Dim fileNum As Integer     Dim fileContent As String     Dim txt As String     ' Create a temporary text file for user input     tempFile = Environ("TEMP") & "\LargeInput_" & Format(Now, "yyyymmdd_hhnnss") & ".txt"     ' Open Notepad for the user to paste unlimited text     Shell "notepad.exe " & tempFile, vbNormalFocus     ' Wait until the user closes Notepad     Do While FileLocked(tempFile)         DoEvents     Loop     ' Read file content     On Error Resume Next     fileNum = FreeFile     Open tempFile For Input As #fileNum     If LOF(fileNum) > 0 Then         fileContent = Input$(LOF(fileNum), #fileNum)     End If     Close #fileNum   ...

Fixed unlimited

Sub Select_Bulk_Data_InputBox_Final3()     Dim sheetName As String     sheetName = "Data 1" ' <<-- Change the sheet name here only (exact name)          Dim wb As Workbook     Dim ws As Worksheet     Dim rng As Range     Dim inputData As String     Dim arrInput As Variant     Dim searchValues() As String     Dim cleanedValues() As String     Dim removeChars As String     Dim arrRemove As Variant     Dim removeProvided As Boolean     Dim colInput As String     Dim arrCols As Variant     Dim validCols As Collection     Dim resultSheet As Worksheet     Dim i As Long, j As Long, k As Long     Dim cell As Range     Dim cellValue As String     Dim lastCol As Long     Dim foundCount As Long     Dim isFound As Boolean     Dim msgText As String ...

button two

Function GetLargeInput() As String     Dim frm As frmBulkInput     Set frm = New frmBulkInput     frm.Show     If frm.Cancelled Then         GetLargeInput = ""     Else         GetLargeInput = frm.UserInput     End If     Unload frm End Function

button one

Option Explicit Public UserInput As String Public Cancelled As Boolean Private Sub btnOK_Click()     Me.UserInput = Me.txtBulk.Text     Me.Cancelled = False     Me.Hide End Sub Private Sub btnCancel_Click()     Me.UserInput = ""     Me.Cancelled = True     Me.Hide End Sub

fixed 😸

Sub Select_Bulk_Data_InputBox_Final3()     Dim sheetName As String     sheetName = "Data 1" ' <<-- Change the sheet name here only (exact name)          Dim wb As Workbook     Dim ws As Worksheet     Dim rng As Range     Dim inputData As String     Dim arrInput As Variant     Dim searchValues() As String     Dim cleanedValues() As String     Dim removeChars As String     Dim arrRemove As Variant     Dim removeProvided As Boolean     Dim colInput As String     Dim arrCols As Variant     Dim validCols As Collection     Dim resultSheet As Worksheet     Dim i As Long, j As Long, k As Long     Dim cell As Range     Dim cellValue As String     Dim lastCol As Long     Dim foundCount As Long     Dim isFound As Boolean     Dim msgText As String ...

fixed

Sub Select_Bulk_Data_InputBox_Final2()     Dim sheetName As String     sheetName = "Data 1" ' <<-- Change the sheet name here only (exact name)     Dim wb As Workbook     Dim ws As Worksheet     Dim rng As Range     Dim inputData As String     Dim arrInput As Variant     Dim searchValues() As String     Dim cleanedValues() As String     Dim removeChars As String     Dim arrRemove As Variant     Dim removeProvided As Boolean     Dim colInput As String     Dim arrCols As Variant     Dim validCols As Collection     Dim foundSheet As Worksheet, notFoundSheet As Worksheet     Dim i As Long, j As Long, k As Long     Dim cell As Range     Dim cellValue As String     Dim lastCol As Long     Dim foundCount As Long, notFoundCount As Long     Dim isFound As Boolean   ...

babyGirl

 Sub Select_Bulk_Data_InputBox()     Dim ws As Worksheet     Dim rng As Range     Dim cell As Range     Dim inputData As String     Dim searchValues() As String     Dim i As Long, j As Long     Dim cellValue As String     Dim selRange As Range     Dim lastCol As Long     Dim searchText As String     Dim colInput As String     Dim colNumbers() As String     Dim colNum As Long     Dim validCols As Collection     Dim removeChars As String     Dim removeList() As String     Dim k As Long     ' Sheet reference     Set ws = ThisWorkbook.Sheets("Data 1")     Set rng = ws.UsedRange          ' Clear previous selection     ws.Cells(1, 1).Select          ' Step 1: Get bulk data from user     inputData = InputBox("Paste your bul...