Shoutbox

Excel and VB - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Excel and VB (/showthread.php?tid=78502)

Excel and VB by MicroWay on 10-28-2007 at 11:41 PM

Well guys, I'm making some work with Excel, and I wanted to put 2 comand buttons so they copy a value or result of one cell to the clipboard...
Anyway... Can someone point me to a tutorial that explains Visual Basic with Excel, please??? Or explains me what I need to do...???

Example of how excel is working:
In a easy way, a result is shown on the Cell (B2) depending on what I specify in other... So B2 has a function, that shows a value depending on what I specify... So, I want to make a button that copies the result on B2 on clipboard...


If someone could help, I would realy apreciate

;)

And... Just adding this code that I've changed a little, but still doesn't work:


Private Sub CommandButton1_Click()
Dim n As Integer
For n = 17 To 17
  cell.Value(n, 2) = Copy(cell)
         
Next n
End Sub


RE: Excel and VB by Quantum on 10-29-2007 at 02:43 AM

Tutorials and info:

long URL 1
long URL 2

Also you may want to read this => http://www.developerfusion.co.uk/show/35/

Dont know the second part but i hope that helps :)


RE: Excel and VB by MicroWay on 10-30-2007 at 11:42 PM

quote:
Originally posted by MicroWay
Thanks!!! I'm taking a look to them...
But remember, please, that if you've more information, please, post it... To help anybody: I'm talking about the macros.
;)

Well, after days of search anf trying to learn something, I discovered that I'm not good on coding this... :S
And obviously this will be the last time I'll use VB with Excel, so could someone code it for me???
Little more information: I have one cel (B17) that with a function it calculates a value. I've made a ComandButton and I've placed it down the "result cell"(B17)... But I need a code that when the button is clicked, the result given on the cell (B17) will be copied to clipboard (as a text)....

Thanks in advance
;)
RE: Excel and VB by pollolibredegrasa on 10-31-2007 at 12:00 AM

If you want to copy the contents of a certain cell to the clipboard, use

code:
Private Sub CommandButton1_Click()
Range("B2").Copy
End Sub
But replace B2 with whatever cell you need.

Is this what you're looking for?
RE: Excel and VB by MicroWay on 10-31-2007 at 12:07 AM

I don't believe!!! I get it too close in my tries.... :S

Thanks anyway, fatfreechicken!!!
;)