Put data in a cell by a pop up

zyxw1234
Banned
Posts: 253
Joined: 22 Apr 2020, 17:24

Put data in a cell by a pop up

Post by zyxw1234 »

Hi Experts,
I am looking for a macro that will create a popup to put the number in S8 cell
what need is popup will occur & i will put the data(number) in that popup & that data will be in S8 & save and close the file

Code: Select all

Sub STEP3()
Dim Wb1 As Workbook
Set Wb1 = Workbooks.Open("C:UsersWolfieeeStyleDesktop1.xls")
Dim Ws1 As Worksheet
Set Ws1 = Wb1.Worksheets.Item(1)

(code for the process)



Wb1.Close SaveChanges:=True
End Sub
Thnx For the Help

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Put data in a cell by a pop up

Post by HansV »

Code: Select all

Ws1.Range("S8").Value = Application.InputBox(Prompt:="Enter a number", Type:=1)
Best wishes,
Hans

zyxw1234
Banned
Posts: 253
Joined: 22 Apr 2020, 17:24

Re: Put data in a cell by a pop up

Post by zyxw1234 »

Thnx Alot HansV Sir
For helping me in solving this Problem
Have a Awesome Day Sir