Thank you Skip, but the real problem is when you are doing a Select Case to enter the data on the spreadsheet, for example:
Set r = Worksheets("Trials").Range("B2").CurrentRegion
ioffset = Sheet3.Range("A54")
ioffset = ioffset + 1
Sheet3.Range("A54") = ioffset...
Hi guys,
I am not sure if this is possible, but I wanted to give it a try. I am working with userforms on excel. One of the userform is called "frmTrials" and on it I have a ComboBox1 that the user may choose from 1 to 3. Based on that decision a second userform is openned called "frmComp"...
Hi,
I would like to extract the filename from the path using excel vba. As I open my file I store its name on a variable calle FileVar. I did some research and found an example of deleting the filename from the path using:
Directory = Left(VarFile, InStrRev(VarFile, "\")).
I am not sure how...
I was able to attach the files in a way that they don't get placed on top of each other, here is what I did. I hope this can help someone else:
Private Sub cmdPhoto_Click()
Dim VarFile As Variant, Ans As Variant
Dim col As Variant
col = 3
Sheet3.Cells(1, col).Select...
Electricpete, Thank you for your help.
Skip,
I am still having some issues. Here is my complete code: Private Sub cmdPhoto_Click()
Dim VarFile As Variant, Ans As Variant
Dim shp As Shape, i As Integer
VarFile = Application.GetOpenFilename("All Files (*.*), *.*")
If VarFile <>...
Hi,
The code above works beautifuly, but if you add more than one picture file, for example, the files get placed on top of each other. Is it possible to assign a specific location for the files? If not, how can I make such that the files don't get placed on top of each other.
The other major...
Skip,
Thank you so much but I could not make it to work using the Terminate event. I was able to make it working using the following code:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
Me.Hide...
Hi everyone,
I am not even sure how to explain what I need. I have 6 forms that are linked to a general form called frmDevices. Here is just a portion of the coding for the dependent userform (frmDevices) where each Case is for a different form:
Private Sub cmbDevice_Change()
Dim r As Range...
Skip,
Thank you so much, this is a lot better than what I had before! You are always giving great answers! You are the best!!!!
Thank you so much!
Moreco
Hi PH,
I am new to programming, so thanks for the hint above. I did what you suggested, but now I am getting an error that says: "Cannot insert object". Can you please help me?
Here is my code:
[Private Sub cmdAddFile_Click()
Dim VarFile As String
VarFile = InputBox("Enter the destination...
Hi everyone,
I have a big project using user-forms in Excel and one of the task is to allow the user to attach different types of files such as text and picture to a cell pre-destinated by my VBA code, so that it can be downloaded by a different user/tech. I am not sure if this can be done...
I have a text file that has 65 columns and 1836 rows.
I need to:
* Open the text file for the given path
* Create a vba code in excel that writes a string before each cell; (Example: "Insert into channel_data ("here have the cell information")"
* Place the entire workbook with the added...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.