Double clicking on a cell in Excel, open source file of that line on userform -
i trying , don't know if it's possible.
i have 20 progress reports of projects. these projects being updated users use userform. once week, have few macros running goes each of them, copy data , put them in project summary in different workbook. want able double click on first cell in given row( there's 200 projects) in project summary workbook , opens specific project in existing userform users using. want open @ source file not in data dump of project summary worksheet.
is there way can this?
edit:
i have tried this:
sub worksheet_beforedoubleclick(byval target range, cancel boolean) dim cell range if intersect(target, range("a:a")) nothing else each cell in range("e:e") if (cell.value = "a, b") workbooks.open filename:= _ "filepath", password:="...", readonly:=true progressreport.show end if next cell end if end sub
i willdo each of 20 other progress report based on value of range(e:e). want when open file load userform, load specific report value in a
use worksheet_beforedoubleclick event macro , cancel possible 'in-cell' editing before happens.
option explicit private sub worksheet_beforedoubleclick(byval target range, cancel boolean) if not intersect(target, target.parent.usedrange, columns("a")) nothing 'cancel 'in-cell editing' cancel = true 'load user form here using target.row 'example: cells(target.row, "e").value value ' column e on same row double-click debug.print target.row end if end sub
you can double-click single cell multiple cells target not possibility.
this belongs in worksheet's code sheet (e.g. right-click name tab, view code); not standard module code sheet.
Comments
Post a Comment