Unable to paste cell value in input box while triggering VBA script

ravi123

New Member
Joined
Dec 25, 2015
Messages
8
Hi All,:)

I'm having a vba script wherein a pdf is being generated by providing account number through input box.
I'm coping a cell value (account number), triggering the vba script through keyboard shortcut, a input box appear and now I'm supposed to paste that copied cell value into input box, however it's not getting pasted. But if I paste cell value in sticky note or in notepad, and then again copy that, come back to script file, trigger the code and paste in input box and it's done.


Data (account number and other info) and VBA script is in same file.


Want to know what I'm doing wrong in first case.:confused: Why cell value is not getting pasted in input box straight from the script file? Is there a some sort of limitation or something else.:eek: In second senerio, code is working like charm.
Please help.
 

Some videos you may like

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Yongle

Well-known Member
Joined
Mar 11, 2015
Messages
5,250
Office Version
365
Platform
Windows
You could use a variable to hold the value, something like this ...

Code:
Dim X As String, IBox as string
X = YourCell.Value
IBox = InputBox( "Mesage Text", "Title Text", X)
 

Forum statistics

Threads
1,089,272
Messages
5,407,313
Members
403,132
Latest member
Black_Mamba_1666

This Week's Hot Topics

Top