Create A macro , which fills the blanks in a sentence.

ankushk268

New Member
Joined
Dec 21, 2021
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
I want a macro in which I need 4 INPUT FEILDS to give the input values (ASIN,BRAND,`BATTERY POWER ,COMPATIABLE DEVICE).
Once i click on the run macro , the above input data should be filled according to the ASIN for the below sentences :-
Intro:

This powerful Power bank from the house of BRAND helps you to rule out of the worry of your phone running out of charge. With BATTERY POWER maH power, it can charge your phone fast and safely. With matte finish body and light weight, this power bank becomes a stylish accessory and is comfortable to carry around with you everywhere.

Compatibility:

The power bank is compatible with COMPATIABLE DEVICE.

The out of the macro should be "ASIN" in front of that it should show above 2 sentences with the values entered for the BRAND , BATTERY POWER, COMPATIABLE DEVICE.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Code:
sub btnSave_click()
range("A1").value = "This powerful Power bank from the house of " & txtBox1 & " helps you to rule out of the worry of your phone running out of charge. With " & txtBox2 & "  maH power, it can charge your phone fast and safely. With matte finish body and light weight, this power bank becomes a stylish accessory and is comfortable to carry around with you everywhere."

range("A4").value = "The power bank is compatible with " & txtBox3 & "."
end sub
 
Upvote 0
Code:
sub btnSave_click()
range("A1").value = "This powerful Power bank from the house of " & txtBox1 & " helps you to rule out of the worry of your phone running out of charge. With " & txtBox2 & "  maH power, it can charge your phone fast and safely. With matte finish body and light weight, this power bank becomes a stylish accessory and is comfortable to carry around with you everywhere."

range("A4").value = "The power bank is compatible with " & txtBox3 & "."
end sub
but we need to inset the values in the txtbox1 and txtbox2 and txtbox3 from a input file
 
Upvote 0

Forum statistics

Threads
1,203,051
Messages
6,053,217
Members
444,648
Latest member
sinkuan85

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top