Hello.
Somethink that seam so simple in my head is turning out to be a pain in the butt.
I have the inputbox so i can set a string value,
When the inputbox Cancle button is pressed i want to exit sub,
If the inputbox value is nothink and ok button, I want the msgbox displayed then goto newname.
If the inputbox has a value do >>>>>>That>>>>>
Code:
Private Sub CommandButton6_Click() 'Upload File
Dim strName As String
Dim imgfolder As String
'get the path to the images
imgfolder = ThisWorkbook.Path & Application.PathSeparator & _
"Images" & Application.PathSeparator
'load picture to form
' Chane file name
If Label1.Caption = "" Or Label1.Caption = vbNewLine & " " & _
"Upload Files From Computer..." Then Exit Sub Else
NewName:
strName = InputBox(Prompt:=Label1.Caption & vbNewLine & vbNewLine _
& vbNewLine & vbNewLine & "Rename File Before Database Entry???", _
Title:="Attachment File Name", Default:="Your Name here"): Rem change for filename
If vbCancel Then Exit Sub
If strName = "" Then msgbox "A Name Must Be Entered", vbOKOnly
If vbOKOnly And strName = "" Then GoTo NewName
If strName <> "" Then FileCopy Label1.Caption, imgfolder & strName & ".jpg"
ListBox1.AddItem strName
Label1.Caption = vbNewLine & " " & _
"Upload Files From Computer..."
CommandButton6.Font.Bold = False
Thankyou.
Set srng = Application.InputBox(prompt:= _ "Select Period", Type:=8)
How to set input box Title and position on screen via xpos and ypos parameters?
Looking for a solid tut on the PROPER way to query a DB in VBA.
I know how to link a pivot to a DB but I'd like to add parameters now for date ranges from cells in the sheet and realize this would only be possible in VBA. I have been scouring the net and have found multiple ways to do it, but nothing in an easy to follow format.
Thx
Hi guys,
Can anyone suggest a site with a free tutorial for VBA. I am completely new to it, so would need something beginning at the absolute basics. Have done a google search but couldn't find anything suitable, so thought I may aswell ask you guys who may already be aware of something!
Thanks for your help
I would like to learn VB, can any one guide me from where i will get free online study material
For 90% of my excel problems soultion was VBA.
I realise that VBA is very powerfull tool to make excel easier and to adjust it to myself.
I would like to learn about VBA from the beginning.
I searched on internet for tutorials,but I couldn't find anything usefull.
Does anybody knows any site for free tutorial downloads?
I don't look for advanced,but for beginners.
Hi
where can I find a good freeware tutorial ( From Beginner To advanced) on the web that I could download.
Thanks
AJ
Hi all,
I am relatively new to excel and keen to enhance my knowledge of it. I was wondering if there any tutorials or walk through 'question and answer' style pages or programs that anyone knows of which could help me. Ideally what i'd be looking for would be a number of problems that need to be solved using certain formulae. The aim of which would be to be introduced to new formulae and new ways of solving problems.
If anyone knows of anything that could help me out, it'd be greatly appreciated.
cheers
All ---
I've been a computer programmer (in various languages) for a long time, so understand the basic concepts and processes involved.
But I'm brand new to VBA. My question has two parts:
(1) What is your recommendation for the overall best VBA tutorial?
(2) Because I'm broke, what is your recommendation for the best VBA tutorial that's FREE ?
Thanks, John