Tag Archives: input

msgbox asking for user input in specific format

Questions: I’m trying to write a quick little macro that asks the user for an input, and then copies this to a specific cell (B14 in Sheet1). Here’s what I’ve got so far: Option Explicit Sub updatesheet() Dim vReply As String vReply = InputBox(“Enter period (format: Q4 2010) to update, or hit enter to escape”)… Read More »

How to take filename as input as create a file in VBA

Questions: Dim fso As Scripting.FileSystemObject Dim ts As Scripting.TextStream Dim c As Range Dim filename As Variant Dim colcount As Integer colcount = 2 Worksheets(“ShipmentTracker(AL3)”).Activate filename = InputBox(“Enter File Name”, “file name”, Worksheets(“ShipmentTracker(AL3)”).Cells(3, 2).Value) Set fso = New Scripting.FileSystemObject Set ts = fso.OpenTextFile(“C:\Users\soora\Desktop\Meng Project\Shipment Tracker” & filename, ForAppending, True) For Each c In Range(“A9”, Range(“A9”).End(xlDown))… Read More »

Excel – how to have Multiple Input Devices (USB)

Questions: How do I differentiate between 2 USB input devices that are both placing data into the spreadsheet? I have 2 USB calipers that input their current measurements as if they were keystrokes. The data is sent to excel (or any program really) and placed vertically. Currently, Excel treats both calipers as if they were… Read More »

List all possible percentage splits for >3 inputs

Questions: I want to create a list of all possible percentage splits between different number of stocks (a task required to build a proper investment opportunity set). I was able to create a macro tailored for 3 different inputs (the code is below). Is it be possible to upgrade that macro so that it will… Read More »

Excel unresponsive when InputBox open, c#

Questions: I’m building an excel add in using c#, and i want the user to select a range. I have the inputbox set up and it’s receiving the range fine when entered as a text. The problem is that excel is unresponsive when the inputbox is open, the user can’t go over to excel and… Read More »