ksmallfoot
New Member
- Joined
- Nov 27, 2018
- Messages
- 9
Hello!
I am quite new to VBA, but I am trying to create a program that allows me to push a button that asks for a file name, and after entering the file name, it opens up the file I requested. I have attempted this here,
______________________________________
Sub Start()
Filename = InputBox("File Name:")
Workbooks.Open Filename
Range("A3:SU11").Cut
Range("A3:SU11").PasteSpecial.Transpose
End Sub
______________________________________________
when I ran this code, it said that it could not find a file with that name. I am not sure what I am doing wrong!
I hope someone can help, thank you!
-K
I am quite new to VBA, but I am trying to create a program that allows me to push a button that asks for a file name, and after entering the file name, it opens up the file I requested. I have attempted this here,
______________________________________
Sub Start()
Filename = InputBox("File Name:")
Workbooks.Open Filename
Range("A3:SU11").Cut
Range("A3:SU11").PasteSpecial.Transpose
End Sub
______________________________________________
when I ran this code, it said that it could not find a file with that name. I am not sure what I am doing wrong!
I hope someone can help, thank you!
-K