LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 383
Default help with: MACRO / SCRIPT for button

hi, I am trying to resove the use of script to my sheet, that usually
refferences a CELL C4.. instead I will look for data in a different column
(AU), If there is a "." in column AU -or- if after a specified row, etc.
then exit; already have some of the specified below (incorrectly mixed in
I'm sure, is what need help with).

with above, not sure how to mix with integer stuff. (not needed with my
parameters?). thanks, "portion" working on:

Option Explicit
Private Sub CommandButton1_Click()

If Range(testCellAddress).Value = "X" Then
Sub GetData()
Dim QuerySheet As Worksheet
Dim DataSheet As Worksheet
Dim qurl As String
Dim i As Integer 'how use with this sheet?
Dim Column1ID As String 'my addition, variables (url..?s=) below
Dim Column2ID As String 'my addition, DESTINATION
Dim topRowID As String 'my addition

Column1ID = Range("E4") 'has:
=SUBSTITUTE(SUBSTITUTE(CELL("address",$AU4),"$","" ),ROW(),"")
Column2ID = Range("E5") 'has:
=SUBSTITUTE(SUBSTITUTE(CELL("address",$EE4),"$","" ),ROW(),"")
topRowID = Range("C6") 'top of grid, should I modify for rows in grid
to a range?
'C4 ALTERNATIVE / USE cells column AU that do not have ".", C6 has:
=ROW($A$139)

Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.Calculation = xlCalculationManual
Set DataSheet = ActiveSheet

' ---------- my addition, if correct idea? need to mix with next section
With Target
If .Count 1 Then Exit Sub
If Target.Row < topRowID Then Exit Sub
' If Me.Cells(.Row, "A").Value = "." Then Exit Sub 'need to change
to indirect with Column1ID
If Me.Cells(.Row, Column1ID).Value = "." Then Exit Sub 'will see if
this is correct
' ---------- my addition

i = 4 ' need help with interger reference per above, start row is not
row 4..
qurl = "http://website?s=" + Cells(i, 1)
i = i + 1
' While Cells(i, 1) < ""
While Cells(i, 1) < ""
qurl = qurl + "+" + Cells(i, 1)
i = i + 1
Wend

qurl = qurl + "&f=" + Range("E2") 'find format tags in cell
Range("E3") = qurl 'place string in cell

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Script mldancing Excel Discussion (Misc queries) 2 March 15th 07 08:35 PM
Button/Script to create a new workbook from a current one. downer Excel Worksheet Functions 0 February 17th 06 09:09 PM
VB script/macro help - please !! Anthony Excel Discussion (Misc queries) 2 July 10th 05 07:58 PM
Macro script error - pls help !! Anthony Excel Discussion (Misc queries) 3 February 28th 05 01:49 PM


All times are GMT +1. The time now is 04:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"